forked from OSchip/llvm-project
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
This commit is contained in:
parent
6a504f6ea8
commit
caf3114245
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue