diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-06-09 20:42:29 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-06-09 20:42:29 +0000 |
commit | 9730f241234216351ad23212d0a3f17cfc61a287 (patch) | |
tree | 2dab9e5d74de95feb2942debfe3bf1c09fa42604 /gdb/mi | |
parent | 8a1bf479ce96c531ca840cb7bb8434cb413bf72e (diff) | |
download | gdb-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/mi')
-rw-r--r-- | gdb/mi/mi-main.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 51cdd32..3fc1586 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -497,8 +497,7 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc) static int get_register (int regnum, int format) { - char raw_buffer[MAX_REGISTER_SIZE]; - char virtual_buffer[MAX_REGISTER_SIZE]; + char buffer[MAX_REGISTER_SIZE]; int optim; int realnum; CORE_ADDR addr; @@ -511,7 +510,7 @@ get_register (int regnum, int format) format = 0; frame_register (deprecated_selected_frame, regnum, &optim, &lval, &addr, - &realnum, raw_buffer); + &realnum, buffer); if (optim) { @@ -519,18 +518,6 @@ get_register (int regnum, int format) return -1; } - /* Convert raw data to virtual format if necessary. */ - - if (DEPRECATED_REGISTER_CONVERTIBLE_P () - && DEPRECATED_REGISTER_CONVERTIBLE (regnum)) - { - DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, - register_type (current_gdbarch, regnum), - raw_buffer, virtual_buffer); - } - else - memcpy (virtual_buffer, raw_buffer, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum)); - if (format == 'r') { int j; @@ -542,7 +529,7 @@ get_register (int regnum, int format) { int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j : DEPRECATED_REGISTER_RAW_SIZE (regnum) - 1 - j; - sprintf (ptr, "%02x", (unsigned char) raw_buffer[idx]); + sprintf (ptr, "%02x", (unsigned char) buffer[idx]); ptr += 2; } ui_out_field_string (uiout, "value", buf); @@ -550,7 +537,7 @@ get_register (int regnum, int format) } else { - val_print (register_type (current_gdbarch, regnum), virtual_buffer, 0, 0, + val_print (register_type (current_gdbarch, regnum), buffer, 0, 0, stb->stream, format, 1, 0, Val_pretty_default); ui_out_field_stream (uiout, "value", stb); ui_out_stream_delete (stb); |