+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
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;
+ memcpy (l, buf, len);
+ printf_filtered ("0x%08x", l[0]);
+ if (len == 8)
+ printf_filtered (" 0x%08x", l[1]);
+ }
+ else
+ {
+ int i;
- printf_filtered ("\t");
- for (i = 0; i < len; i++)
- printf_filtered ("0x%x ", buf[i]);
- printf_filtered ("\n");
- }
+ for (i = 0; i < len; i++)
+ printf_filtered ("0x%02x ", buf[i]);
}
+
+ printf_filtered ("\n");
}
/* Initialize gdb_callback. */