This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch rfc] Deprecate tm_print_insn
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 25 Apr 2003 23:20:36 -0400
- Subject: [patch rfc] Deprecate tm_print_insn
Another one bites the dust. Architectures should be able to instead
just set gdbarch_print_insn.
I'll look to commit in a few days,
Andrew
Index: doc/ChangeLog
2003-04-25 Andrew Cagney <cagney at redhat dot com>
* gdbint.texinfo (Target Architecture Definition): Rename
"tm_print_insn" to "deprecated_tm_print_insn".
2003-04-25 Andrew Cagney <cagney at redhat dot com>
* gdbarch.sh (deprecated_tm_print_insn): Rename tm_print_insn.
* gdbarch.h, gdbarch.c: Re-generate.
* xstormy16-tdep.c (_initialize_xstormy16_tdep): Update.
* vax-tdep.c (_initialize_vax_tdep): Update.
* v850-tdep.c (_initialize_v850_tdep): Update.
* sparc-tdep.c (_initialize_sparc_tdep): Update.
* s390-tdep.c (_initialize_s390_tdep): Update.
* ns32k-tdep.c (_initialize_ns32k_tdep): Update.
* mn10300-tdep.c (_initialize_mn10300_tdep): Update.
* mips-tdep.c (_initialize_mips_tdep): Update.
* mcore-tdep.c (_initialize_mcore_tdep): Update.
* m68k-tdep.c (_initialize_m68k_tdep): Update.
* ia64-tdep.c (_initialize_ia64_tdep): Update.
* hppa-tdep.c (_initialize_hppa_tdep): Update.
* h8300-tdep.c (_initialize_h8300_tdep): Update.
* frv-tdep.c (_initialize_frv_tdep): Update.
* d10v-tdep.c (display_trace): Update.
* cris-tdep.c (cris_delayed_get_disassembler): Update.
(_initialize_cris_tdep): Update.
* arch-utils.c (legacy_print_insn): Update.
* alpha-tdep.c (_initialize_alpha_tdep): Update.
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.79
diff -u -r1.79 alpha-tdep.c
--- alpha-tdep.c 11 Apr 2003 18:15:38 -0000 1.79
+++ alpha-tdep.c 26 Apr 2003 03:15:15 -0000
@@ -1925,7 +1925,7 @@
gdbarch_register (bfd_arch_alpha, alpha_gdbarch_init, alpha_dump_tdep);
- tm_print_insn = print_insn_alpha;
+ deprecated_tm_print_insn = print_insn_alpha;
/* Let the user set the fence post for heuristic_proc_start. */
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.79
diff -u -r1.79 arch-utils.c
--- arch-utils.c 11 Apr 2003 18:15:38 -0000 1.79
+++ arch-utils.c 26 Apr 2003 03:15:16 -0000
@@ -209,7 +209,7 @@
int
legacy_print_insn (bfd_vma vma, disassemble_info *info)
{
- return (*tm_print_insn) (vma, info);
+ return (*deprecated_tm_print_insn) (vma, info);
}
/* Helper functions for INNER_THAN */
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.68
diff -u -r1.68 cris-tdep.c
--- cris-tdep.c 21 Apr 2003 16:48:37 -0000 1.68
+++ cris-tdep.c 26 Apr 2003 03:15:17 -0000
@@ -3548,7 +3548,7 @@
static int
cris_delayed_get_disassembler (bfd_vma addr, disassemble_info *info)
{
- tm_print_insn = cris_get_disassembler (exec_bfd);
+ deprecated_tm_print_insn = cris_get_disassembler (exec_bfd);
return TARGET_PRINT_INSN (addr, info);
}
@@ -3861,7 +3861,7 @@
gdbarch_register (bfd_arch_cris, cris_gdbarch_init, cris_dump_tdep);
/* Used in disassembly. */
- tm_print_insn = cris_delayed_get_disassembler;
+ deprecated_tm_print_insn = cris_delayed_get_disassembler;
/* CRIS-specific user-commands. */
c = add_set_cmd ("cris-version", class_support, var_integer,
Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.108
diff -u -r1.108 d10v-tdep.c
--- d10v-tdep.c 25 Apr 2003 22:14:05 -0000 1.108
+++ d10v-tdep.c 26 Apr 2003 03:15:17 -0000
@@ -1368,7 +1368,7 @@
printf_filtered ("\t");
wrap_here (" ");
next_address += TARGET_PRINT_INSN (next_address,
- &tm_print_insn_info);
+ &deprecated_tm_print_insn_info);
printf_filtered ("\n");
gdb_flush (gdb_stdout);
}
Index: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.32
diff -u -r1.32 frv-tdep.c
--- frv-tdep.c 11 Apr 2003 18:15:38 -0000 1.32
+++ frv-tdep.c 26 Apr 2003 03:15:17 -0000
@@ -1147,7 +1147,7 @@
{
register_gdbarch_init (bfd_arch_frv, frv_gdbarch_init);
- tm_print_insn = print_insn_frv;
+ deprecated_tm_print_insn = print_insn_frv;
}
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.225
diff -u -r1.225 gdbarch.sh
--- gdbarch.sh 12 Apr 2003 17:41:25 -0000 1.225
+++ gdbarch.sh 26 Apr 2003 03:15:23 -0000
@@ -1218,7 +1218,7 @@
extern void dis_asm_print_address (bfd_vma addr,
disassemble_info *info);
-extern int (*tm_print_insn) (bfd_vma, disassemble_info*);
+extern int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info*);
extern disassemble_info tm_print_insn_info;
#ifndef TARGET_PRINT_INSN_INFO
#define TARGET_PRINT_INSN_INFO (&tm_print_insn_info)
@@ -2377,7 +2377,7 @@
/* Disassembler */
/* Pointer to the target-dependent disassembly function. */
-int (*tm_print_insn) (bfd_vma, disassemble_info *);
+int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
disassemble_info tm_print_insn_info;
Index: h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.55
diff -u -r1.55 h8300-tdep.c
--- h8300-tdep.c 11 Apr 2003 18:15:38 -0000 1.55
+++ h8300-tdep.c 26 Apr 2003 03:15:23 -0000
@@ -1177,6 +1177,6 @@
void
_initialize_h8300_tdep (void)
{
- tm_print_insn = gdb_print_insn_h8300;
+ deprecated_tm_print_insn = gdb_print_insn_h8300;
register_gdbarch_init (bfd_arch_h8300, h8300_gdbarch_init);
}
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.71
diff -u -r1.71 hppa-tdep.c
--- hppa-tdep.c 22 Apr 2003 23:04:39 -0000 1.71
+++ hppa-tdep.c 26 Apr 2003 03:15:24 -0000
@@ -5050,7 +5050,7 @@
void break_at_finish_at_depth_command (char *arg, int from_tty);
gdbarch_register (bfd_arch_hppa, hppa_gdbarch_init, hppa_dump_tdep);
- tm_print_insn = print_insn_hppa;
+ deprecated_tm_print_insn = print_insn_hppa;
add_cmd ("unwind", class_maintenance, unwind_command,
"Print unwind table entry at given address.",
Index: ia64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
retrieving revision 1.69
diff -u -r1.69 ia64-tdep.c
--- ia64-tdep.c 11 Apr 2003 18:15:38 -0000 1.69
+++ ia64-tdep.c 26 Apr 2003 03:15:25 -0000
@@ -2251,6 +2251,6 @@
{
register_gdbarch_init (bfd_arch_ia64, ia64_gdbarch_init);
- tm_print_insn = print_insn_ia64;
+ deprecated_tm_print_insn = print_insn_ia64;
tm_print_insn_info.bytes_per_line = SLOT_MULTIPLIER;
}
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.56
diff -u -r1.56 m68k-tdep.c
--- m68k-tdep.c 11 Apr 2003 18:15:38 -0000 1.56
+++ m68k-tdep.c 26 Apr 2003 03:15:25 -0000
@@ -1066,5 +1066,5 @@
_initialize_m68k_tdep (void)
{
gdbarch_register (bfd_arch_m68k, m68k_gdbarch_init, m68k_dump_tdep);
- tm_print_insn = print_insn_m68k;
+ deprecated_tm_print_insn = print_insn_m68k;
}
Index: mcore-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mcore-tdep.c,v
retrieving revision 1.57
diff -u -r1.57 mcore-tdep.c
--- mcore-tdep.c 21 Apr 2003 16:48:39 -0000 1.57
+++ mcore-tdep.c 26 Apr 2003 03:15:25 -0000
@@ -1173,7 +1173,7 @@
{
extern int print_insn_mcore (bfd_vma, disassemble_info *);
gdbarch_register (bfd_arch_mcore, mcore_gdbarch_init, mcore_dump_tdep);
- tm_print_insn = print_insn_mcore;
+ deprecated_tm_print_insn = print_insn_mcore;
#ifdef MCORE_DEBUG
add_show_from_set (add_set_cmd ("mcoredebug", no_class,
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.191
diff -u -r1.191 mips-tdep.c
--- mips-tdep.c 14 Apr 2003 19:16:13 -0000 1.191
+++ mips-tdep.c 26 Apr 2003 03:15:27 -0000
@@ -6396,8 +6396,8 @@
internal_error (__FILE__, __LINE__, "mips_abi_strings out of sync");
gdbarch_register (bfd_arch_mips, mips_gdbarch_init, mips_dump_tdep);
- if (!tm_print_insn) /* Someone may have already set it */
- tm_print_insn = gdb_print_insn_mips;
+ if (!deprecated_tm_print_insn) /* Someone may have already set it */
+ deprecated_tm_print_insn = gdb_print_insn_mips;
/* Add root prefix command for all "set mips"/"show mips" commands */
add_prefix_cmd ("mips", no_class, set_mips_command,
Index: mn10300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v
retrieving revision 1.72
diff -u -r1.72 mn10300-tdep.c
--- mn10300-tdep.c 21 Apr 2003 16:48:39 -0000 1.72
+++ mn10300-tdep.c 26 Apr 2003 03:15:27 -0000
@@ -1209,7 +1209,7 @@
{
/* printf("_initialize_mn10300_tdep\n"); */
- tm_print_insn = print_insn_mn10300;
+ deprecated_tm_print_insn = print_insn_mn10300;
register_gdbarch_init (bfd_arch_mn10300, mn10300_gdbarch_init);
}
Index: ns32k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v
retrieving revision 1.44
diff -u -r1.44 ns32k-tdep.c
--- ns32k-tdep.c 11 Apr 2003 18:15:39 -0000 1.44
+++ ns32k-tdep.c 26 Apr 2003 03:15:27 -0000
@@ -624,5 +624,5 @@
{
gdbarch_register (bfd_arch_ns32k, ns32k_gdbarch_init, NULL);
- tm_print_insn = print_insn_ns32k;
+ deprecated_tm_print_insn = print_insn_ns32k;
}
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.92
diff -u -r1.92 s390-tdep.c
--- s390-tdep.c 18 Apr 2003 20:20:21 -0000 1.92
+++ s390-tdep.c 26 Apr 2003 03:15:27 -0000
@@ -1925,8 +1925,8 @@
/* Hook us into the gdbarch mechanism. */
register_gdbarch_init (bfd_arch_s390, s390_gdbarch_init);
- if (!tm_print_insn) /* Someone may have already set it */
- tm_print_insn = gdb_print_insn_s390;
+ if (!deprecated_tm_print_insn) /* Someone may have already set it */
+ deprecated_tm_print_insn = gdb_print_insn_s390;
}
#endif /* GDBSERVER */
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.90
diff -u -r1.90 sparc-tdep.c
--- sparc-tdep.c 21 Apr 2003 16:48:39 -0000 1.90
+++ sparc-tdep.c 26 Apr 2003 03:15:28 -0000
@@ -2460,7 +2460,7 @@
/* Hook us into the gdbarch mechanism. */
gdbarch_register (bfd_arch_sparc, sparc_gdbarch_init, sparc_dump_tdep);
- tm_print_insn = gdb_print_insn_sparc;
+ deprecated_tm_print_insn = gdb_print_insn_sparc;
tm_print_insn_info.mach = TM_PRINT_INSN_MACH; /* Selects sparc/sparclite */
/* OBSOLETE target_architecture_hook = sparc_target_architecture_hook; */
}
Index: v850-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/v850-tdep.c,v
retrieving revision 1.56
diff -u -r1.56 v850-tdep.c
--- v850-tdep.c 21 Apr 2003 16:48:40 -0000 1.56
+++ v850-tdep.c 26 Apr 2003 03:15:29 -0000
@@ -1296,6 +1296,6 @@
void
_initialize_v850_tdep (void)
{
- tm_print_insn = print_insn_v850;
+ deprecated_tm_print_insn = print_insn_v850;
register_gdbarch_init (bfd_arch_v850, v850_gdbarch_init);
}
Index: vax-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/vax-tdep.c,v
retrieving revision 1.45
diff -u -r1.45 vax-tdep.c
--- vax-tdep.c 11 Apr 2003 18:15:39 -0000 1.45
+++ vax-tdep.c 26 Apr 2003 03:15:29 -0000
@@ -696,5 +696,5 @@
{
gdbarch_register (bfd_arch_vax, vax_gdbarch_init, NULL);
- tm_print_insn = vax_print_insn;
+ deprecated_tm_print_insn = vax_print_insn;
}
Index: xstormy16-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v
retrieving revision 1.46
diff -u -r1.46 xstormy16-tdep.c
--- xstormy16-tdep.c 11 Apr 2003 18:15:39 -0000 1.46
+++ xstormy16-tdep.c 26 Apr 2003 03:15:29 -0000
@@ -1130,5 +1130,5 @@
extern int print_insn_xstormy16 ();
register_gdbarch_init (bfd_arch_xstormy16, xstormy16_gdbarch_init);
- tm_print_insn = print_insn_xstormy16;
+ deprecated_tm_print_insn = print_insn_xstormy16;
}
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.140
diff -u -r1.140 gdbint.texinfo
--- doc/gdbint.texinfo 8 Apr 2003 21:25:33 -0000 1.140
+++ doc/gdbint.texinfo 26 Apr 2003 03:15:32 -0000
@@ -3908,11 +3908,12 @@
instruction. It prints the instruction at address @var{addr} in
debugged memory and returns the length of the instruction, in bytes. If
a target doesn't define its own printing routine, it defaults to an
-accessor function for the global pointer @code{tm_print_insn}. This
-usually points to a function in the @code{opcodes} library (@pxref{Support
-Libraries, ,Opcodes}). @var{info} is a structure (of type
- at code{disassemble_info}) defined in @file{include/dis-asm.h} used to
-pass information to the instruction decoding routine.
+accessor function for the global pointer
+ at code{deprecated_tm_print_insn} dot This usually points to a function in
+the @code{opcodes} library (@pxref{Support Libraries, ,Opcodes}).
+ at var{info} is a structure (of type @code{disassemble_info}) defined in
+ at file{include/dis-asm.h} used to pass information to the instruction
+decoding routine.
@item struct frame_id unwind_dummy_id (struct frame_info * at var{frame})
@findex unwind_dummy_id