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 | |
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.
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/arch-utils.c | 13 | ||||
-rw-r--r-- | gdb/findvar.c | 8 | ||||
-rw-r--r-- | gdb/gdbarch.c | 106 | ||||
-rw-r--r-- | gdb/gdbarch.h | 54 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 10 | ||||
-rw-r--r-- | gdb/infcmd.c | 29 | ||||
-rw-r--r-- | gdb/mi/mi-main.c | 21 |
8 files changed, 25 insertions, 227 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 91ff9fd..d8bdc5b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 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. + * infptrace.c (child_xfer_memory) [CLEAR_INSN_CACHE]: Delete #ifdef CLEAR_INSN_CACHE code. * target.c (generic_mourn_inferior) [CLEAR_DEFERRED_STORES]: diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 9ea360e..0f7ea06 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -301,28 +301,21 @@ legacy_pc_in_sigtramp (CORE_ADDR pc, char *name) int legacy_convert_register_p (int regnum, struct type *type) { - return (DEPRECATED_REGISTER_CONVERTIBLE_P () - && DEPRECATED_REGISTER_CONVERTIBLE (regnum)); + return 0; } void legacy_register_to_value (struct frame_info *frame, int regnum, struct type *type, void *to) { - char from[MAX_REGISTER_SIZE]; - get_frame_register (frame, regnum, from); - DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to); + internal_error (__FILE__, __LINE__, "legacy_register_to_value called"); } void legacy_value_to_register (struct frame_info *frame, int regnum, struct type *type, const void *tmp) { - char to[MAX_REGISTER_SIZE]; - char *from = alloca (TYPE_LENGTH (type)); - memcpy (from, from, TYPE_LENGTH (type)); - DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to); - put_frame_register (frame, regnum, to); + internal_error (__FILE__, __LINE__, "legacy_value_to_register called"); } int diff --git a/gdb/findvar.c b/gdb/findvar.c index cb1ef65..e4ab862 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -284,13 +284,7 @@ value_of_register (int regnum, struct frame_info *frame) /* 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, VALUE_CONTENTS_RAW (reg_val)); - } - else if (DEPRECATED_REGISTER_RAW_SIZE (regnum) == DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum)) + if (DEPRECATED_REGISTER_RAW_SIZE (regnum) == DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum)) memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum)); else diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index fe857cd..553935d 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -176,9 +176,6 @@ struct gdbarch gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc; int believe_pcc_promotion; gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register; - gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible; - gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual; - gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw; gdbarch_convert_register_p_ftype *convert_register_p; gdbarch_register_to_value_ftype *register_to_value; gdbarch_value_to_register_ftype *value_to_register; @@ -329,9 +326,6 @@ struct gdbarch startup_gdbarch = 0, /* deprecated_init_frame_pc */ 0, /* believe_pcc_promotion */ 0, /* deprecated_get_saved_register */ - 0, /* deprecated_register_convertible */ - 0, /* deprecated_register_convert_to_virtual */ - 0, /* deprecated_register_convert_to_raw */ 0, /* convert_register_p */ 0, /* register_to_value */ 0, /* value_to_register */ @@ -616,9 +610,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch) /* Skip verify of deprecated_pc_in_call_dummy, has predicate */ /* Skip verify of deprecated_init_frame_pc, has predicate */ /* Skip verify of deprecated_get_saved_register, has predicate */ - /* Skip verify of deprecated_register_convertible, has predicate */ - /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */ - /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */ /* Skip verify of convert_register_p, invalid_p == 0 */ /* Skip verify of register_to_value, invalid_p == 0 */ /* Skip verify of value_to_register, invalid_p == 0 */ @@ -1305,45 +1296,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n", DEPRECATED_REGISTER_BYTES); #endif -#ifdef DEPRECATED_REGISTER_CONVERTIBLE_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_REGISTER_CONVERTIBLE_P()", - XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ())); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n", - DEPRECATED_REGISTER_CONVERTIBLE_P ()); -#endif -#ifdef DEPRECATED_REGISTER_CONVERTIBLE - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_REGISTER_CONVERTIBLE(nr)", - XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr))); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n", - (long) current_gdbarch->deprecated_register_convertible - /*DEPRECATED_REGISTER_CONVERTIBLE ()*/); -#endif -#ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)", - XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to))); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n", - (long) current_gdbarch->deprecated_register_convert_to_raw - /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/); -#endif -#ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)", - XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to))); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n", - (long) current_gdbarch->deprecated_register_convert_to_virtual - /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/); -#endif #ifdef DEPRECATED_REGISTER_RAW_SIZE_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -3496,64 +3448,6 @@ set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, } int -gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->deprecated_register_convertible != NULL; -} - -int -gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_register_convertible != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n"); - return gdbarch->deprecated_register_convertible (nr); -} - -void -set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, - gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible) -{ - gdbarch->deprecated_register_convertible = deprecated_register_convertible; -} - -void -gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_register_convert_to_virtual != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n"); - gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to); -} - -void -set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, - gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual) -{ - gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual; -} - -void -gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_register_convert_to_raw != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n"); - gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to); -} - -void -set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, - gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw) -{ - gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw; -} - -int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) { gdb_assert (gdbarch != NULL); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index b59ace6..5cd038b 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1049,60 +1049,6 @@ extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, #define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_deprecated_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval)) #endif -/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. - For raw <-> cooked register conversions, replaced by pseudo registers. */ - -#if defined (DEPRECATED_REGISTER_CONVERTIBLE) -/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_CONVERTIBLE */ -#if !defined (DEPRECATED_REGISTER_CONVERTIBLE_P) -#define DEPRECATED_REGISTER_CONVERTIBLE_P() (1) -#endif -#endif - -extern int gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE_P) -#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE" -#endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_CONVERTIBLE_P) -#define DEPRECATED_REGISTER_CONVERTIBLE_P() (gdbarch_deprecated_register_convertible_p (current_gdbarch)) -#endif - -typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr); -extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr); -extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE) -#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE" -#endif -#if !defined (DEPRECATED_REGISTER_CONVERTIBLE) -#define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr)) -#endif - -/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. - For raw <-> cooked register conversions, replaced by pseudo registers. */ - -typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to); -extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to); -extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) -#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL" -#endif -#if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) -#define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to)) -#endif - -/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. - For raw <-> cooked register conversions, replaced by pseudo registers. */ - -typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to); -extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to); -extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW) -#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW" -#endif -#if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW) -#define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to)) -#endif - typedef int (gdbarch_convert_register_p_ftype) (int regnum, struct type *type); extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type); extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 181f782..d06b9c8 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -550,16 +550,6 @@ F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, st v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion::::::: F:2:DEPRECATED_GET_SAVED_REGISTER:void:deprecated_get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval # -# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. -# For raw <-> cooked register conversions, replaced by pseudo registers. -F::DEPRECATED_REGISTER_CONVERTIBLE:int:deprecated_register_convertible:int nr:nr -# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. -# For raw <-> cooked register conversions, replaced by pseudo registers. -f:2:DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL:void:deprecated_register_convert_to_virtual:int regnum, struct type *type, char *from, char *to:regnum, type, from, to:::0::0 -# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. -# For raw <-> cooked register conversions, replaced by pseudo registers. -f:2:DEPRECATED_REGISTER_CONVERT_TO_RAW:void:deprecated_register_convert_to_raw:struct type *type, int regnum, const char *from, char *to:type, regnum, from, to:::0::0 -# f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum, struct type *type:regnum, type::0:legacy_convert_register_p::0 f:1:REGISTER_TO_VALUE:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, void *buf:frame, regnum, type, buf::0:legacy_register_to_value::0 f:1:VALUE_TO_REGISTER:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const void *buf:frame, regnum, type, buf::0:legacy_value_to_register::0 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); } } 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); |