diff options
author | Ed Maste <emaste@FreeBSD.org> | 2013-11-06 16:48:53 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2013-11-06 16:48:53 +0000 |
commit | f21a844f60ae6c74fcf1fddca32461acce3c1ee0 (patch) | |
tree | 56d79f94966870db1cecd65a7264510a25fd1cba /source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | |
parent | 37d22554be9f5a677dad2a95b7ef22fe59c66a8a (diff) | |
download | src-f21a844f60ae6c74fcf1fddca32461acce3c1ee0.tar.gz src-f21a844f60ae6c74fcf1fddca32461acce3c1ee0.zip |
Import lldb as of SVN r194122vendor/lldb/lldb-r194122
Sponsored by: DARPA, AFRL
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=257752
svn path=/vendor/lldb/lldb-r194122/; revision=257753; tag=vendor/lldb/lldb-r194122
Diffstat (limited to 'source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp')
-rw-r--r-- | source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp index 38fb84d66ef3..4e475c80bdab 100644 --- a/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp +++ b/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp @@ -10,16 +10,17 @@ #include "ThreadGDBRemote.h" +#include "lldb/Breakpoint/Watchpoint.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/StreamString.h" #include "lldb/Core/State.h" +#include "lldb/Core/StreamString.h" +#include "lldb/Target/Platform.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" #include "lldb/Target/Unwind.h" -#include "lldb/Breakpoint/Watchpoint.h" #include "ProcessGDBRemote.h" #include "ProcessGDBRemoteLog.h" @@ -73,13 +74,38 @@ ThreadGDBRemote::GetQueueName () ProcessSP process_sp (GetProcess()); if (process_sp) { - ProcessGDBRemote *gdb_process = static_cast<ProcessGDBRemote *>(process_sp.get()); - return gdb_process->GetDispatchQueueNameForThread (m_thread_dispatch_qaddr, m_dispatch_queue_name); + PlatformSP platform_sp (process_sp->GetTarget().GetPlatform()); + if (platform_sp) + { + m_dispatch_queue_name = platform_sp->GetQueueNameForThreadQAddress (process_sp.get(), m_thread_dispatch_qaddr); + } + if (m_dispatch_queue_name.length() > 0) + { + return m_dispatch_queue_name.c_str(); + } } } return NULL; } +queue_id_t +ThreadGDBRemote::GetQueueID () +{ + if (m_thread_dispatch_qaddr != 0 || m_thread_dispatch_qaddr != LLDB_INVALID_ADDRESS) + { + ProcessSP process_sp (GetProcess()); + if (process_sp) + { + PlatformSP platform_sp (process_sp->GetTarget().GetPlatform()); + if (platform_sp) + { + return platform_sp->GetQueueIDForThreadQAddress (process_sp.get(), m_thread_dispatch_qaddr); + } + } + } + return LLDB_INVALID_QUEUE_ID; +} + void ThreadGDBRemote::WillResume (StateType resume_state) { @@ -164,7 +190,6 @@ lldb::RegisterContextSP ThreadGDBRemote::CreateRegisterContextForFrame (StackFrame *frame) { lldb::RegisterContextSP reg_ctx_sp; - const bool read_all_registers_at_once = false; uint32_t concrete_frame_idx = 0; if (frame) @@ -177,6 +202,8 @@ ThreadGDBRemote::CreateRegisterContextForFrame (StackFrame *frame) if (process_sp) { ProcessGDBRemote *gdb_process = static_cast<ProcessGDBRemote *>(process_sp.get()); + // read_all_registers_at_once will be true if 'p' packet is not supported. + bool read_all_registers_at_once = !gdb_process->GetGDBRemote().GetpPacketSupported (GetID()); reg_ctx_sp.reset (new GDBRemoteRegisterContext (*this, concrete_frame_idx, gdb_process->m_register_info, read_all_registers_at_once)); } } |