gdb/ChangeLog * remote-sim.c (dump_mem): Always dump buffer contents, zero fill output and use uint32_t not long to ensure 4 byte size.
This commit is contained in:
parent
975531dbc9
commit
3d46829657
@ -1,3 +1,8 @@
|
||||
2012-10-02 Andrew Burgess <aburgess@broadcom.com>
|
||||
|
||||
* remote-sim.c (dump_mem): Always dump buffer contents, zero fill
|
||||
output and use uint32_t not long to ensure 4 byte size.
|
||||
|
||||
2012-10-02 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* rs6000-nat.c (add_vmap): Set "last" to "next" after having
|
||||
|
@ -273,28 +273,26 @@ sim_inferior_data_cleanup (struct inferior *inf, void *data)
|
||||
static void
|
||||
dump_mem (char *buf, int len)
|
||||
{
|
||||
if (len <= 8)
|
||||
printf_filtered ("\t");
|
||||
|
||||
if (len == 8 || len == 4)
|
||||
{
|
||||
if (len == 8 || len == 4)
|
||||
{
|
||||
long l[2];
|
||||
uint32_t l[2];
|
||||
|
||||
memcpy (l, buf, len);
|
||||
printf_filtered ("\t0x%lx", l[0]);
|
||||
if (len == 8)
|
||||
printf_filtered (" 0x%lx", l[1]);
|
||||
printf_filtered ("\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
int i;
|
||||
|
||||
printf_filtered ("\t");
|
||||
for (i = 0; i < len; i++)
|
||||
printf_filtered ("0x%x ", buf[i]);
|
||||
printf_filtered ("\n");
|
||||
}
|
||||
memcpy (l, buf, len);
|
||||
printf_filtered ("0x%08x", l[0]);
|
||||
if (len == 8)
|
||||
printf_filtered (" 0x%08x", l[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
printf_filtered ("0x%02x ", buf[i]);
|
||||
}
|
||||
|
||||
printf_filtered ("\n");
|
||||
}
|
||||
|
||||
/* Initialize gdb_callback. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user