diff options
author | emaste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
commit | 01ee1789d6aa7294e5966a97f8d29387f6f81699 (patch) | |
tree | c94307da318be46e5aeea1a325c1e91749506e4f /source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | |
parent | 788502c6f6261e2d84ef85d1052b41a6c5be31b3 (diff) | |
download | FreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.zip FreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.tar.gz |
Import LLDB as of upstream SVN r216948 (git 50f7fe44)
This corresponds with the branchpoint for the 3.5 release.
A number of files not required for the FreeBSD build have been removed.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp')
-rw-r--r-- | source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp index fb524de..5c70cb5 100644 --- a/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp +++ b/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp @@ -107,6 +107,58 @@ ThreadGDBRemote::GetQueueID () return LLDB_INVALID_QUEUE_ID; } +QueueSP +ThreadGDBRemote::GetQueue () +{ + queue_id_t queue_id = GetQueueID(); + QueueSP queue; + if (queue_id != LLDB_INVALID_QUEUE_ID) + { + ProcessSP process_sp (GetProcess()); + if (process_sp) + { + queue = process_sp->GetQueueList().FindQueueByID (queue_id); + } + } + return queue; +} + +addr_t +ThreadGDBRemote::GetQueueLibdispatchQueueAddress () +{ + addr_t dispatch_queue_t_addr = LLDB_INVALID_ADDRESS; + if (m_thread_dispatch_qaddr != 0 || m_thread_dispatch_qaddr != LLDB_INVALID_ADDRESS) + { + ProcessSP process_sp (GetProcess()); + if (process_sp) + { + SystemRuntime *runtime = process_sp->GetSystemRuntime (); + if (runtime) + { + dispatch_queue_t_addr = runtime->GetLibdispatchQueueAddressFromThreadQAddress (m_thread_dispatch_qaddr); + } + } + } + return dispatch_queue_t_addr; +} + +StructuredData::ObjectSP +ThreadGDBRemote::FetchThreadExtendedInfo () +{ + StructuredData::ObjectSP object_sp; + const lldb::user_id_t tid = GetProtocolID(); + Log *log(lldb_private::GetLogIfAnyCategoriesSet (GDBR_LOG_THREAD)); + if (log) + log->Printf ("Fetching extended information for thread %4.4" PRIx64, tid); + ProcessSP process_sp (GetProcess()); + if (process_sp) + { + ProcessGDBRemote *gdb_process = static_cast<ProcessGDBRemote *>(process_sp.get()); + object_sp = gdb_process->GetExtendedInfoForThread (tid); + } + return object_sp; +} + void ThreadGDBRemote::WillResume (StateType resume_state) { |