* target.c (debug_print_register): Use regcache_raw_collect

instead of regcache_cooked_read.  Only handle raw registers.
This commit is contained in:
Ulrich Weigand
2008-08-26 12:42:00 +00:00
parent c820be077e
commit 0ff587217a
2 changed files with 7 additions and 3 deletions

View File

@@ -2546,18 +2546,17 @@ debug_print_register (const char * func,
struct gdbarch *gdbarch = get_regcache_arch (regcache);
fprintf_unfiltered (gdb_stdlog, "%s ", func);
if (regno >= 0 && regno < gdbarch_num_regs (gdbarch)
+ gdbarch_num_pseudo_regs (gdbarch)
&& gdbarch_register_name (gdbarch, regno) != NULL
&& gdbarch_register_name (gdbarch, regno)[0] != '\0')
fprintf_unfiltered (gdb_stdlog, "(%s)",
gdbarch_register_name (gdbarch, regno));
else
fprintf_unfiltered (gdb_stdlog, "(%d)", regno);
if (regno >= 0)
if (regno >= 0 && regno < gdbarch_num_regs (gdbarch))
{
int i, size = register_size (gdbarch, regno);
unsigned char buf[MAX_REGISTER_SIZE];
regcache_cooked_read (regcache, regno, buf);
regcache_raw_collect (regcache, regno, buf);
fprintf_unfiltered (gdb_stdlog, " = ");
for (i = 0; i < size; i++)
{