From: Ulrich Weigand Date: Tue, 26 Aug 2008 12:42:00 +0000 (+0000) Subject: * target.c (debug_print_register): Use regcache_raw_collect X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ff587217ae8235beedbc5f367e945b1c15a864d;p=binutils-gdb.git * target.c (debug_print_register): Use regcache_raw_collect instead of regcache_cooked_read. Only handle raw registers. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a6445cd0f12..15d3499a7e0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-08-26 Ulrich Weigand + + * target.c (debug_print_register): Use regcache_raw_collect + instead of regcache_cooked_read. Only handle raw registers. + 2008-08-25 Pedro Alves * cp-name-parser.y: Include config.h before system headers. diff --git a/gdb/target.c b/gdb/target.c index 1f658194d2e..2aff5a61711 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -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++) {