diff options
author | Hafiz Abid Qadeer <hafiz_abid@mentor.com> | 2013-08-29 09:09:45 +0000 |
---|---|---|
committer | Hafiz Abid Qadeer <hafiz_abid@mentor.com> | 2013-08-29 09:09:45 +0000 |
commit | 9a78cdf825849463a9f2d3b6543eb6e7974fc225 (patch) | |
tree | 0f15c95da1352cdac9d38fb8738032b88ee7652f /lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | |
parent | 0ccd3f61b14e359ce38c0b9e3f5e9ec5c4541e82 (diff) | |
download | bcm5719-llvm-9a78cdf825849463a9f2d3b6543eb6e7974fc225.tar.gz bcm5719-llvm-9a78cdf825849463a9f2d3b6543eb6e7974fc225.zip |
Discover support of 'p' packet.
Some stubs only support g/G packets for registers.
This change makes sure that we check if remote stub supports 'p' packet before using it.
llvm-svn: 189576
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp index 38fb84d66ef..b405f03463c 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp @@ -164,7 +164,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 +176,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 (); reg_ctx_sp.reset (new GDBRemoteRegisterContext (*this, concrete_frame_idx, gdb_process->m_register_info, read_all_registers_at_once)); } } |