From 9730f241234216351ad23212d0a3f17cfc61a287 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 9 Jun 2004 20:42:29 +0000 Subject: 2004-06-09 Andrew Cagney * gdbarch.sh (DEPRECATED_REGISTER_CONVERT_TO_RAW) (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) (DEPRECATED_REGISTER_CONVERTIBLE): Delete. * gdbarch.h, gdbarch.c: Re-generate. * infcmd.c (default_print_registers_info): Simplify. * findvar.c (value_of_register): Simplify. * mi/mi-main.c (get_register): Simplify. * arch-utils.c (legacy_convert_register_p): Always return 0. (legacy_register_to_value, legacy_value_to_register): Always call internal_error. --- gdb/infcmd.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'gdb/infcmd.c') diff --git a/gdb/infcmd.c b/gdb/infcmd.c index bc4fb6e..b58e411 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1548,8 +1548,7 @@ default_print_registers_info (struct gdbarch *gdbarch, { int i; const int numregs = NUM_REGS + NUM_PSEUDO_REGS; - char raw_buffer[MAX_REGISTER_SIZE]; - char virtual_buffer[MAX_REGISTER_SIZE]; + char buffer[MAX_REGISTER_SIZE]; if (DEPRECATED_DO_REGISTERS_INFO_P ()) { @@ -1589,35 +1588,19 @@ default_print_registers_info (struct gdbarch *gdbarch, print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file); /* Get the data in raw format. */ - if (! frame_register_read (frame, i, raw_buffer)) + if (! frame_register_read (frame, i, buffer)) { fprintf_filtered (file, "*value not available*\n"); continue; } - /* FIXME: cagney/2002-08-03: This code shouldn't be necessary. - The function frame_register_read() should have returned the - pre-cooked register so no conversion is necessary. */ - /* Convert raw data to virtual format if necessary. */ - if (DEPRECATED_REGISTER_CONVERTIBLE_P () - && DEPRECATED_REGISTER_CONVERTIBLE (i)) - { - DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (i, register_type (current_gdbarch, i), - raw_buffer, virtual_buffer); - } - else - { - memcpy (virtual_buffer, raw_buffer, - DEPRECATED_REGISTER_VIRTUAL_SIZE (i)); - } - /* If virtual format is floating, print it that way, and in raw hex. */ if (TYPE_CODE (register_type (current_gdbarch, i)) == TYPE_CODE_FLT) { int j; - val_print (register_type (current_gdbarch, i), virtual_buffer, 0, 0, + val_print (register_type (current_gdbarch, i), buffer, 0, 0, file, 0, 1, 0, Val_pretty_default); fprintf_filtered (file, "\t(raw 0x"); @@ -1628,21 +1611,21 @@ default_print_registers_info (struct gdbarch *gdbarch, idx = j; else idx = DEPRECATED_REGISTER_RAW_SIZE (i) - 1 - j; - fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]); + fprintf_filtered (file, "%02x", (unsigned char) buffer[idx]); } fprintf_filtered (file, ")"); } else { /* Print the register in hex. */ - val_print (register_type (current_gdbarch, i), virtual_buffer, 0, 0, + val_print (register_type (current_gdbarch, i), buffer, 0, 0, file, 'x', 1, 0, Val_pretty_default); /* If not a vector register, print it also according to its natural format. */ if (TYPE_VECTOR (register_type (current_gdbarch, i)) == 0) { fprintf_filtered (file, "\t"); - val_print (register_type (current_gdbarch, i), virtual_buffer, 0, 0, + val_print (register_type (current_gdbarch, i), buffer, 0, 0, file, 0, 1, 0, Val_pretty_default); } } -- cgit v1.1