2007-10-22 Markus Deuling <deuling@de.ibm.com>
* target.c (debug_print_register): Use get_regcache_arch to get at the current architecture by regcache.
This commit is contained in:
parent
39cbfefa3a
commit
f8d2990873
2 changed files with 13 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-10-22 Markus Deuling <deuling@de.ibm.com>
|
||||||
|
|
||||||
|
* target.c (debug_print_register): Use get_regcache_arch to get at the
|
||||||
|
current architecture by regcache.
|
||||||
|
|
||||||
2007-10-21 Daniel Jacobowitz <dan@codesourcery.com>
|
2007-10-21 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
* dwarf2read.c (read_file_scope): Add a comment.
|
* dwarf2read.c (read_file_scope): Add a comment.
|
||||||
|
|
15
gdb/target.c
15
gdb/target.c
|
@ -2165,18 +2165,19 @@ static void
|
||||||
debug_print_register (const char * func,
|
debug_print_register (const char * func,
|
||||||
struct regcache *regcache, int regno)
|
struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
|
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||||
fprintf_unfiltered (gdb_stdlog, "%s ", func);
|
fprintf_unfiltered (gdb_stdlog, "%s ", func);
|
||||||
if (regno >= 0 && regno < gdbarch_num_regs (current_gdbarch)
|
if (regno >= 0 && regno < gdbarch_num_regs (gdbarch)
|
||||||
+ gdbarch_num_pseudo_regs (current_gdbarch)
|
+ gdbarch_num_pseudo_regs (gdbarch)
|
||||||
&& gdbarch_register_name (current_gdbarch, regno) != NULL
|
&& gdbarch_register_name (gdbarch, regno) != NULL
|
||||||
&& gdbarch_register_name (current_gdbarch, regno)[0] != '\0')
|
&& gdbarch_register_name (gdbarch, regno)[0] != '\0')
|
||||||
fprintf_unfiltered (gdb_stdlog, "(%s)", gdbarch_register_name
|
fprintf_unfiltered (gdb_stdlog, "(%s)",
|
||||||
(current_gdbarch, regno));
|
gdbarch_register_name (gdbarch, regno));
|
||||||
else
|
else
|
||||||
fprintf_unfiltered (gdb_stdlog, "(%d)", regno);
|
fprintf_unfiltered (gdb_stdlog, "(%d)", regno);
|
||||||
if (regno >= 0)
|
if (regno >= 0)
|
||||||
{
|
{
|
||||||
int i, size = register_size (current_gdbarch, regno);
|
int i, size = register_size (gdbarch, regno);
|
||||||
unsigned char buf[MAX_REGISTER_SIZE];
|
unsigned char buf[MAX_REGISTER_SIZE];
|
||||||
regcache_cooked_read (regcache, regno, buf);
|
regcache_cooked_read (regcache, regno, buf);
|
||||||
fprintf_unfiltered (gdb_stdlog, " = ");
|
fprintf_unfiltered (gdb_stdlog, " = ");
|
||||||
|
|
Loading…
Reference in a new issue