From: uweigand Date: Mon, 22 Oct 2007 14:03:36 +0000 (+0000) Subject: 2007-10-22 Markus Deuling X-Git-Tag: EOL_registry_mounts~1967 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=041a978b24028a4e16ccf12ac1273b7fdb0969cb;p=pf3gnuchains%2Fpf3gnuchains4x.git 2007-10-22 Markus Deuling * target.c (debug_print_register): Use get_regcache_arch to get at the current architecture by regcache. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2c95850d6f..e25bbcf09c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-10-22 Markus Deuling + + * target.c (debug_print_register): Use get_regcache_arch to get at the + current architecture by regcache. + 2007-10-21 Daniel Jacobowitz * dwarf2read.c (read_file_scope): Add a comment. diff --git a/gdb/target.c b/gdb/target.c index 356df74f0e..d89a7fbc86 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -2165,18 +2165,19 @@ static void debug_print_register (const char * func, struct regcache *regcache, int regno) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); fprintf_unfiltered (gdb_stdlog, "%s ", func); - if (regno >= 0 && regno < gdbarch_num_regs (current_gdbarch) - + gdbarch_num_pseudo_regs (current_gdbarch) - && gdbarch_register_name (current_gdbarch, regno) != NULL - && gdbarch_register_name (current_gdbarch, regno)[0] != '\0') - fprintf_unfiltered (gdb_stdlog, "(%s)", gdbarch_register_name - (current_gdbarch, regno)); + 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) { - int i, size = register_size (current_gdbarch, regno); + int i, size = register_size (gdbarch, regno); unsigned char buf[MAX_REGISTER_SIZE]; regcache_cooked_read (regcache, regno, buf); fprintf_unfiltered (gdb_stdlog, " = ");