diff options
| author | Chaoren Lin <chaorenl@google.com> | 2015-02-17 15:41:28 +0000 |
|---|---|---|
| committer | Chaoren Lin <chaorenl@google.com> | 2015-02-17 15:41:28 +0000 |
| commit | caf3114245cff258ecf7cfa1ffbb868efd02665f (patch) | |
| tree | e837fef1c41dc1f29b331b0473c09bc6e9aa2281 /lldb/source/Plugins/Process | |
| parent | 6a504f6ea816dad5bc5774d6dd8007d9edbddbcf (diff) | |
| download | bcm5719-llvm-caf3114245cff258ecf7cfa1ffbb868efd02665f.tar.gz bcm5719-llvm-caf3114245cff258ecf7cfa1ffbb868efd02665f.zip | |
Send default register number instead of GDB register number in StopReplyPacket.
Summary:
Using GDB register numbers confuses ProcessGDBRemote since the rest of
LLGS (qRegisterInfo, p, P) uses the default register numbers instead.
Test Plan: dosep.py --options --arch x86 ...
Reviewers: ovyalov, vharron, sivachandra
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7635
llvm-svn: 229505
Diffstat (limited to 'lldb/source/Plugins/Process')
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 991eef2e979..1334ae1551b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -446,24 +446,6 @@ WriteRegisterValueInHexFixedWidth (StreamString &response, } } -static void -WriteGdbRegnumWithFixedWidthHexRegisterValue (StreamString &response, - NativeRegisterContextSP ®_ctx_sp, - const RegisterInfo ®_info, - const RegisterValue ®_value) -{ - // Output the register number as 'NN:VVVVVVVV;' where NN is a 2 bytes HEX - // gdb register number, and VVVVVVVV is the correct number of hex bytes - // as ASCII for the register value. - if (reg_info.kinds[eRegisterKindGDB] == LLDB_INVALID_REGNUM) - return; - - response.Printf ("%.02x:", reg_info.kinds[eRegisterKindGDB]); - WriteRegisterValueInHexFixedWidth (response, reg_ctx_sp, reg_info, ®_value); - response.PutChar (';'); -} - - GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread (lldb::tid_t tid) { @@ -588,7 +570,11 @@ GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread (lldb::tid_t tid) RegisterValue reg_value; Error error = reg_ctx_sp->ReadRegister (reg_info_p, reg_value); if (error.Success ()) - WriteGdbRegnumWithFixedWidthHexRegisterValue (response, reg_ctx_sp, *reg_info_p, reg_value); + { + response.Printf ("%.02x:", *reg_num_p); + WriteRegisterValueInHexFixedWidth(response, reg_ctx_sp, *reg_info_p, ®_value); + response.PutChar (';'); + } else { if (log) |

