[Lldb-commits] [lldb] r191802 - Update RNBRemote to handle the new pseudo_regs field added to DNBRegisterInfo
Jason Molenda
jmolenda at apple.com
Tue Oct 1 16:54:23 PDT 2013
Author: jmolenda
Date: Tue Oct 1 18:54:23 2013
New Revision: 191802
URL: http://llvm.org/viewvc/llvm-project?rev=191802&view=rev
Log:
Update RNBRemote to handle the new pseudo_regs field added to DNBRegisterInfo
back in r173096 by Greg. When constructing a g packet or parsing a G packet,
and we're iterate over our register list, skip registers that are actually
just slices of other, real, registers. For instance, eax is 32-bits of rax
on x86_64.
<rdar://problem/15104187>
Modified:
lldb/trunk/tools/debugserver/source/RNBRemote.cpp
Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=191802&r1=191801&r2=191802&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Tue Oct 1 18:54:23 2013
@@ -876,6 +876,8 @@ RegisterEntryNotAvailable (register_map_
reg_entry->nub_info.reg_dwarf = INVALID_NUB_REGNUM;
reg_entry->nub_info.reg_generic = INVALID_NUB_REGNUM;
reg_entry->nub_info.reg_gdb = INVALID_NUB_REGNUM;
+ reg_entry->nub_info.pseudo_regs = NULL;
+ reg_entry->nub_info.update_regs = NULL;
}
@@ -2833,7 +2835,8 @@ RNBRemote::HandlePacket_g (const char *p
}
for (uint32_t reg = 0; reg < g_num_reg_entries; reg++)
- register_value_in_hex_fixed_width (ostrm, pid, tid, &g_reg_entries[reg], NULL);
+ if (g_reg_entries[reg].nub_info.pseudo_regs == NULL) // skip registers that are a slice of a real register
+ register_value_in_hex_fixed_width (ostrm, pid, tid, &g_reg_entries[reg], NULL);
return SendPacket (ostrm.str ());
}
@@ -2896,15 +2899,17 @@ RNBRemote::HandlePacket_G (const char *p
for (uint32_t reg = 0; reg < g_num_reg_entries; reg++)
{
const register_map_entry_t *reg_entry = &g_reg_entries[reg];
-
- reg_value.info = reg_entry->nub_info;
- if (packet.GetHexBytes (reg_value.value.v_sint8, reg_entry->gdb_size, 0xcc) != reg_entry->gdb_size)
- break;
-
- if (reg_entry->fail_value == NULL)
+ if (reg_entry->nub_info.pseudo_regs == NULL) // skip registers that are a slice of a real register
{
- if (!DNBThreadSetRegisterValueByID (pid, tid, reg_entry->nub_info.set, reg_entry->nub_info.reg, ®_value))
- return SendPacket ("E15");
+ reg_value.info = reg_entry->nub_info;
+ if (packet.GetHexBytes (reg_value.value.v_sint8, reg_entry->gdb_size, 0xcc) != reg_entry->gdb_size)
+ break;
+
+ if (reg_entry->fail_value == NULL)
+ {
+ if (!DNBThreadSetRegisterValueByID (pid, tid, reg_entry->nub_info.set, reg_entry->nub_info.reg, ®_value))
+ return SendPacket ("E15");
+ }
}
}
return SendPacket ("OK");
More information about the lldb-commits
mailing list