From: Andrew Cagney Date: Sat, 26 Oct 2002 17:19:28 +0000 (+0000) Subject: 2002-10-26 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=903ad3a6adced99c0142ab49edeb89ca18c1e6ec;p=binutils-gdb.git 2002-10-26 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete definition of DO_REGISTERS_INFO. 2002-10-26 Andrew Cagney * gdbarch.sh (DEPRECATED_DO_REGISTERS_INFO): Rename DO_REGISTERS_INFO. gdbarch.h, gdbarch.c: Re-generate. * infcmd.c (default_print_registers_info): Update reference. * mips-tdep.c (mips_gdbarch_init): Set deprecated_do_registers_info. (mips_dump_tdep): Do not print DO_REGISTERS_INFO. * sh-tdep.c (sh_gdbarch_init): Ditto. * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. * h8300-tdep.c (h8300_gdbarch_init): Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 85da82fda8d..220366bb427 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2002-10-26 Andrew Cagney + + * gdbarch.sh (DEPRECATED_DO_REGISTERS_INFO): Rename + DO_REGISTERS_INFO. + gdbarch.h, gdbarch.c: Re-generate. + * infcmd.c (default_print_registers_info): Update reference. + * mips-tdep.c (mips_gdbarch_init): Set deprecated_do_registers_info. + (mips_dump_tdep): Do not print DO_REGISTERS_INFO. + * sh-tdep.c (sh_gdbarch_init): Ditto. + * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. + * h8300-tdep.c (h8300_gdbarch_init): Ditto. + 2002-10-26 Mark Kettenis * x86-64-tdep.c (x86_64_init_abi): Set init_extra_frame_info to diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index 6fd8c033652..272078fbcb0 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -249,10 +249,10 @@ extern CORE_ADDR saved_pc_after_call (struct frame_info *); (buf)[sizeof(CORE_ADDR) -1] &= ~0x3; \ } while (0) -/* Define DO_REGISTERS_INFO() to do machine-specific formatting +/* Define DEPRECATED_REGISTERS_INFO() to do machine-specific formatting of register dumps. */ -#define DO_REGISTERS_INFO(_regnum, fp) pa_do_registers_info (_regnum, fp) +#define DEPRECATED_REGISTERS_INFO(_regnum, fp) pa_do_registers_info (_regnum, fp) extern void pa_do_registers_info (int, int); #if 0 diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 1923c8bf873..7f05283d24b 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2002-10-26 Andrew Cagney + + * gdbint.texinfo (Target Architecture Definition): Delete + definition of DO_REGISTERS_INFO. + 2002-10-18 Kevin Buettner * gdbint.texinfo (Address Classes): Fix problems with insertion diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index cdb06b2ff36..0cdbc053376 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -3218,12 +3218,6 @@ Similarly, for hardware breakpoints. If defined, this should evaluate to 1 if @var{addr} is in a shared library in which breakpoints cannot be set and so should be disabled. -@item DO_REGISTERS_INFO -@findex DO_REGISTERS_INFO -If defined, use this to print the value of a register or all registers. - -This method is deprecated. - @item PRINT_FLOAT_INFO() @findex PRINT_FLOAT_INFO If defined, then the @samp{info float} command will print information about diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 901c47e4f7a..b34e56506b1 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -171,7 +171,7 @@ struct gdbarch gdbarch_register_virtual_size_ftype *register_virtual_size; int max_register_virtual_size; gdbarch_register_virtual_type_ftype *register_virtual_type; - gdbarch_do_registers_info_ftype *do_registers_info; + gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info; gdbarch_print_registers_info_ftype *print_registers_info; gdbarch_print_float_info_ftype *print_float_info; gdbarch_print_vector_info_ftype *print_vector_info; @@ -664,7 +664,7 @@ verify_gdbarch (struct gdbarch *gdbarch) if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && (gdbarch->register_virtual_type == 0)) fprintf_unfiltered (log, "\n\tregister_virtual_type"); - /* Skip verify of do_registers_info, has predicate */ + /* Skip verify of deprecated_do_registers_info, has predicate */ /* Skip verify of print_registers_info, invalid_p == 0 */ /* Skip verify of print_float_info, has predicate */ /* Skip verify of print_vector_info, has predicate */ @@ -1105,6 +1105,20 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", (long) DECR_PC_AFTER_BREAK); #endif +#ifdef DEPRECATED_DO_REGISTERS_INFO +#if GDB_MULTI_ARCH + /* Macro might contain `[{}]' when not multi-arch */ + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)", + XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs))); +#endif + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = 0x%08lx\n", + (long) current_gdbarch->deprecated_do_registers_info + /*DEPRECATED_DO_REGISTERS_INFO ()*/); +#endif #ifdef DEPRECATED_EXTRACT_RETURN_VALUE #if GDB_MULTI_ARCH /* Macro might contain `[{}]' when not multi-arch */ @@ -1144,20 +1158,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->deprecated_store_return_value /*DEPRECATED_STORE_RETURN_VALUE ()*/); #endif -#ifdef DO_REGISTERS_INFO -#if GDB_MULTI_ARCH - /* Macro might contain `[{}]' when not multi-arch */ - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DO_REGISTERS_INFO(reg_nr, fpregs)", - XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs))); -#endif - if (GDB_MULTI_ARCH) - fprintf_unfiltered (file, - "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n", - (long) current_gdbarch->do_registers_info - /*DO_REGISTERS_INFO ()*/); -#endif #ifdef DWARF2_BUILD_FRAME_INFO #if GDB_MULTI_ARCH /* Macro might contain `[{}]' when not multi-arch */ @@ -3113,29 +3113,29 @@ set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, } int -gdbarch_do_registers_info_p (struct gdbarch *gdbarch) +gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - return gdbarch->do_registers_info != 0; + return gdbarch->deprecated_do_registers_info != 0; } void -gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs) +gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs) { gdb_assert (gdbarch != NULL); - if (gdbarch->do_registers_info == 0) + if (gdbarch->deprecated_do_registers_info == 0) internal_error (__FILE__, __LINE__, - "gdbarch: gdbarch_do_registers_info invalid"); + "gdbarch: gdbarch_deprecated_do_registers_info invalid"); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n"); - gdbarch->do_registers_info (reg_nr, fpregs); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n"); + gdbarch->deprecated_do_registers_info (reg_nr, fpregs); } void -set_gdbarch_do_registers_info (struct gdbarch *gdbarch, - gdbarch_do_registers_info_ftype do_registers_info) +set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, + gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info) { - gdbarch->do_registers_info = do_registers_info; + gdbarch->deprecated_do_registers_info = deprecated_do_registers_info; } void diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 994ae8262a6..524071a1d2d 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -778,40 +778,40 @@ extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_ #endif #endif -#if defined (DO_REGISTERS_INFO) -/* Legacy for systems yet to multi-arch DO_REGISTERS_INFO */ -#if !defined (DO_REGISTERS_INFO_P) -#define DO_REGISTERS_INFO_P() (1) +#if defined (DEPRECATED_DO_REGISTERS_INFO) +/* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */ +#if !defined (DEPRECATED_DO_REGISTERS_INFO_P) +#define DEPRECATED_DO_REGISTERS_INFO_P() (1) #endif #endif /* Default predicate for non- multi-arch targets. */ -#if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO_P) -#define DO_REGISTERS_INFO_P() (0) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P) +#define DEPRECATED_DO_REGISTERS_INFO_P() (0) #endif -extern int gdbarch_do_registers_info_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO_P) -#error "Non multi-arch definition of DO_REGISTERS_INFO" +extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P) +#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO" #endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO_P) -#define DO_REGISTERS_INFO_P() (gdbarch_do_registers_info_p (current_gdbarch)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P) +#define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch)) #endif /* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO) -#define DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DO_REGISTERS_INFO"), 0) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO) +#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0) #endif -typedef void (gdbarch_do_registers_info_ftype) (int reg_nr, int fpregs); -extern void gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs); -extern void set_gdbarch_do_registers_info (struct gdbarch *gdbarch, gdbarch_do_registers_info_ftype *do_registers_info); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO) -#error "Non multi-arch definition of DO_REGISTERS_INFO" +typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs); +extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs); +extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO) +#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO" #endif #if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO) -#define DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_do_registers_info (current_gdbarch, reg_nr, fpregs)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO) +#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs)) #endif #endif diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 6c9ac048bc6..da0e76010f7 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -468,7 +468,7 @@ f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_r v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1 f:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0 # -F:2:DO_REGISTERS_INFO:void:do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs +F:2:DEPRECATED_DO_REGISTERS_INFO:void:deprecated_do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs m:2:PRINT_REGISTERS_INFO:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all:::default_print_registers_info::0 M:2:PRINT_FLOAT_INFO:void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args M:2:PRINT_VECTOR_INFO:void:print_vector_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index affd8dd58ec..57f51fcff43 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1085,7 +1085,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_virtual_size (gdbarch, h8300_register_raw_size); set_gdbarch_max_register_virtual_size (gdbarch, h8300h_reg_size); set_gdbarch_register_virtual_type (gdbarch, h8300_register_virtual_type); - set_gdbarch_do_registers_info (gdbarch, h8300_do_registers_info); + set_gdbarch_deprecated_do_registers_info (gdbarch, h8300_do_registers_info); set_gdbarch_print_float_info (gdbarch, h8300_print_float_info); /* diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 5359e290e7b..38cb1b69a4b 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1571,10 +1571,9 @@ default_print_registers_info (struct gdbarch *gdbarch, char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE); char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE); - /* FIXME: cagney/2002-03-08: This should be deprecated. */ - if (DO_REGISTERS_INFO_P ()) + if (DEPRECATED_DO_REGISTERS_INFO_P ()) { - DO_REGISTERS_INFO (regnum, print_all); + DEPRECATED_DO_REGISTERS_INFO (regnum, print_all); return; } diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 39086066332..75f1c84ff14 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -6060,7 +6060,7 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type); set_gdbarch_register_virtual_size (gdbarch, generic_register_size); - set_gdbarch_do_registers_info (gdbarch, mips_do_registers_info); + set_gdbarch_deprecated_do_registers_info (gdbarch, mips_do_registers_info); set_gdbarch_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp); /* Hook in OS ABI-specific overrides, if they have been registered. */ @@ -6193,9 +6193,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "mips_dump_tdep: CAUSE_REGNUM = %d\n", CAUSE_REGNUM); - fprintf_unfiltered (file, - "mips_dump_tdep: DO_REGISTERS_INFO # %s\n", - XSTRING (DO_REGISTERS_INFO)); fprintf_unfiltered (file, "mips_dump_tdep: DWARF_REG_TO_REGNUM # %s\n", XSTRING (DWARF_REG_TO_REGNUM (REGNUM))); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 6e7bada4cad..a5536b1e74f 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1148,7 +1148,7 @@ mn10300_gdbarch_init (struct gdbarch_info info, set_gdbarch_register_virtual_size (gdbarch, mn10300_register_virtual_size); set_gdbarch_register_virtual_type (gdbarch, mn10300_register_virtual_type); set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mn10300_dwarf2_reg_to_regnum); - set_gdbarch_do_registers_info (gdbarch, mn10300_do_registers_info); + set_gdbarch_deprecated_do_registers_info (gdbarch, mn10300_do_registers_info); set_gdbarch_sp_regnum (gdbarch, 8); set_gdbarch_pc_regnum (gdbarch, 9); set_gdbarch_fp_regnum (gdbarch, 31); diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index c5e5bf457d2..31db4c87806 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -4289,7 +4289,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_regnum (gdbarch, 16); set_gdbarch_register_size (gdbarch, 4); set_gdbarch_register_bytes (gdbarch, SH_DEFAULT_NUM_REGS * 4); - set_gdbarch_do_registers_info (gdbarch, sh_do_registers_info); + set_gdbarch_deprecated_do_registers_info (gdbarch, sh_do_registers_info); set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc); set_gdbarch_frame_chain (gdbarch, sh_frame_chain); set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register); @@ -4516,7 +4516,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read); set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write); - set_gdbarch_do_registers_info (gdbarch, sh64_do_registers_info); + set_gdbarch_deprecated_do_registers_info (gdbarch, sh64_do_registers_info); set_gdbarch_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs); set_gdbarch_breakpoint_from_pc (gdbarch, sh_sh64_breakpoint_from_pc); set_gdbarch_init_extra_frame_info (gdbarch, sh64_init_extra_frame_info);