aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-06-09 20:42:29 +0000
committerAndrew Cagney <cagney@redhat.com>2004-06-09 20:42:29 +0000
commit9730f241234216351ad23212d0a3f17cfc61a287 (patch)
tree2dab9e5d74de95feb2942debfe3bf1c09fa42604 /gdb/infcmd.c
parent8a1bf479ce96c531ca840cb7bb8434cb413bf72e (diff)
downloadgdb-9730f241234216351ad23212d0a3f17cfc61a287.zip
gdb-9730f241234216351ad23212d0a3f17cfc61a287.tar.gz
gdb-9730f241234216351ad23212d0a3f17cfc61a287.tar.bz2
2004-06-09 Andrew Cagney <cagney@gnu.org>
* 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.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c29
1 files changed, 6 insertions, 23 deletions
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);
}
}