aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-05-24 17:23:52 +0100
committerYao Qi <yao.qi@linaro.org>2017-05-24 17:23:52 +0100
commit39503f82427e22ed8e04d986ccdc8562091ec62e (patch)
treeb25888e68551d99e1a96e7913018d51a0affa678
parent003ca0fd22863aaf1a9811c8a35a0133a2d27fb1 (diff)
downloadgdb-39503f82427e22ed8e04d986ccdc8562091ec62e.zip
gdb-39503f82427e22ed8e04d986ccdc8562091ec62e.tar.gz
gdb-39503f82427e22ed8e04d986ccdc8562091ec62e.tar.bz2
Delegate opcodes to select disassembler in GDB
This patch changes GDB to use disassembler selected by opcodes in default, so that we don't have to duplicate the selection logic again in GDB side. For example, gdb/score-tdep.c has static int score_print_insn (bfd_vma memaddr, struct disassemble_info *info) { if (info->endian == BFD_ENDIAN_BIG) return print_insn_big_score (memaddr, info); else return print_insn_little_score (memaddr, info); } and opcodes/disassemble.c has the same logic, case bfd_arch_score: if (big) disassemble = print_insn_big_score; else disassemble = print_insn_little_score; This patch removes the logic in GDB and calls opcodes/disassemble.c:disassembler in default to select disassembler. gdb: 2017-05-24 Yao Qi <yao.qi@linaro.org> * alpha-tdep.c (alpha_gdbarch_init): Don't call set_gdbarch_print_insn. * arc-tdep.c (arc_gdbarch_init): Likewise. * arch-utils.c: include dis-asm.h. (default_print_insn): New function. * arch-utils.h (default_print_insn): Declare. * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn. * bfin-tdep.c (bfin_gdbarch_init): Likewise. * cris-tdep.c (cris_delayed_get_disassembler): Remove. (cris_gdbarch_init): Don't call set_gdbarch_print_insn. * frv-tdep.c (frv_gdbarch_init): Likewise. * ft32-tdep.c (ft32_gdbarch_init): Likewise. * gdbarch.sh (print_insn): Use default_print_insn. * gdbarch.c: Regenerated. * hppa-tdep.c (hppa_gdbarch_init): Likewise. * iq2000-tdep.c (iq2000_gdbarch_init): Likewise. * lm32-tdep.c (lm32_gdbarch_init): Likewise. * m32c-tdep.c (m32c_gdbarch_init): Likewise. * m32r-tdep.c (m32r_gdbarch_init): Likewise. * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove. (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn. * m68k-tdep.c (m68k_gdbarch_init): Likewise. * m88k-tdep.c (m88k_gdbarch_init): Likewise. * microblaze-tdep.c (microblaze_gdbarch_init): Likewise. * mn10300-tdep.c (mn10300_gdbarch_init): Likewise. * moxie-tdep.c (moxie_gdbarch_init): Likewise. * msp430-tdep.c (msp430_gdbarch_init): Likewise. * mt-tdep.c (mt_gdbarch_init): Likewise. * nds32-tdep.c (nds32_gdbarch_init): Likewise. * nios2-tdep.c (nios2_print_insn): Remove. (nios2_gdbarch_init): Don't call set_gdbarch_print_insn. * rx-tdep.c (rx_gdbarch_init): Likewise. * s390-linux-tdep.c (s390_gdbarch_init): Likewise. * score-tdep.c (score_print_insn): Remove. (score_gdbarch_init): Don't call set_gdbarch_print_insn. * sh-tdep.c (sh_gdbarch_init): Likewise. * sh64-tdep.c (sh64_gdbarch_init): Likewise. * sparc-tdep.c (sparc32_gdbarch_init): Likewise. * tic6x-tdep.c (tic6x_print_insn): Remove. (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn. * tilegx-tdep.c (tilegx_gdbarch_init): Likewise. * v850-tdep.c (v850_gdbarch_init): Likewise. * vax-tdep.c (vax_gdbarch_init): Likewise. * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise. * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
-rw-r--r--gdb/ChangeLog48
-rw-r--r--gdb/alpha-tdep.c3
-rw-r--r--gdb/arc-tdep.c2
-rw-r--r--gdb/arch-utils.c20
-rw-r--r--gdb/arch-utils.h2
-rw-r--r--gdb/avr-tdep.c1
-rw-r--r--gdb/bfin-tdep.c1
-rw-r--r--gdb/cris-tdep.c18
-rw-r--r--gdb/frv-tdep.c1
-rw-r--r--gdb/ft32-tdep.c2
-rw-r--r--gdb/gdbarch.c4
-rwxr-xr-xgdb/gdbarch.sh2
-rw-r--r--gdb/hppa-tdep.c2
-rw-r--r--gdb/iq2000-tdep.c1
-rw-r--r--gdb/lm32-tdep.c3
-rw-r--r--gdb/m32c-tdep.c3
-rw-r--r--gdb/m32r-tdep.c2
-rw-r--r--gdb/m68hc11-tdep.c11
-rw-r--r--gdb/m68k-tdep.c4
-rw-r--r--gdb/m88k-tdep.c2
-rw-r--r--gdb/microblaze-tdep.c2
-rw-r--r--gdb/mn10300-tdep.c2
-rw-r--r--gdb/moxie-tdep.c2
-rw-r--r--gdb/msp430-tdep.c3
-rw-r--r--gdb/mt-tdep.c1
-rw-r--r--gdb/nds32-tdep.c2
-rw-r--r--gdb/nios2-tdep.c14
-rw-r--r--gdb/rx-tdep.c2
-rw-r--r--gdb/s390-linux-tdep.c2
-rw-r--r--gdb/score-tdep.c10
-rw-r--r--gdb/sh-tdep.c1
-rw-r--r--gdb/sh64-tdep.c2
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/tic6x-tdep.c10
-rw-r--r--gdb/tilegx-tdep.c2
-rw-r--r--gdb/v850-tdep.c2
-rw-r--r--gdb/vax-tdep.c2
-rw-r--r--gdb/xstormy16-tdep.c2
-rw-r--r--gdb/xtensa-tdep.c2
39 files changed, 73 insertions, 124 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c8bd6fd..fa6cf2c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,51 @@
+2017-05-24 Yao Qi <yao.qi@linaro.org>
+
+ * alpha-tdep.c (alpha_gdbarch_init): Don't call
+ set_gdbarch_print_insn.
+ * arc-tdep.c (arc_gdbarch_init): Likewise.
+ * arch-utils.c: include dis-asm.h.
+ (default_print_insn): New function.
+ * arch-utils.h (default_print_insn): Declare.
+ * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
+ * bfin-tdep.c (bfin_gdbarch_init): Likewise.
+ * cris-tdep.c (cris_delayed_get_disassembler): Remove.
+ (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
+ * frv-tdep.c (frv_gdbarch_init): Likewise.
+ * ft32-tdep.c (ft32_gdbarch_init): Likewise.
+ * gdbarch.sh (print_insn): Use default_print_insn.
+ * gdbarch.c: Regenerated.
+ * hppa-tdep.c (hppa_gdbarch_init): Likewise.
+ * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
+ * lm32-tdep.c (lm32_gdbarch_init): Likewise.
+ * m32c-tdep.c (m32c_gdbarch_init): Likewise.
+ * m32r-tdep.c (m32r_gdbarch_init): Likewise.
+ * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
+ (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
+ * m68k-tdep.c (m68k_gdbarch_init): Likewise.
+ * m88k-tdep.c (m88k_gdbarch_init): Likewise.
+ * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
+ * moxie-tdep.c (moxie_gdbarch_init): Likewise.
+ * msp430-tdep.c (msp430_gdbarch_init): Likewise.
+ * mt-tdep.c (mt_gdbarch_init): Likewise.
+ * nds32-tdep.c (nds32_gdbarch_init): Likewise.
+ * nios2-tdep.c (nios2_print_insn): Remove.
+ (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
+ * rx-tdep.c (rx_gdbarch_init): Likewise.
+ * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
+ * score-tdep.c (score_print_insn): Remove.
+ (score_gdbarch_init): Don't call set_gdbarch_print_insn.
+ * sh-tdep.c (sh_gdbarch_init): Likewise.
+ * sh64-tdep.c (sh64_gdbarch_init): Likewise.
+ * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
+ * tic6x-tdep.c (tic6x_print_insn): Remove.
+ (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
+ * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
+ * v850-tdep.c (v850_gdbarch_init): Likewise.
+ * vax-tdep.c (vax_gdbarch_init): Likewise.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
+ * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
+
2017-05-23 John Baldwin <jhb@FreeBSD.org>
* mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index d62566c..b1bc6a1 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1798,9 +1798,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Prologue heuristics. */
set_gdbarch_skip_prologue (gdbarch, alpha_skip_prologue);
- /* Disassembler. */
- set_gdbarch_print_insn (gdbarch, print_insn_alpha);
-
/* Call info. */
set_gdbarch_return_value (gdbarch, alpha_return_value);
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index 4f866a9..d9ee5c6 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -2013,8 +2013,6 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_align (gdbarch, arc_frame_align);
- set_gdbarch_print_insn (gdbarch, arc_delayed_print_insn);
-
set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
/* "nonsteppable" watchpoint means that watchpoint triggers before
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index b1cec80..c011b0f 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -37,6 +37,7 @@
#include "floatformat.h"
+#include "dis-asm.h"
struct displaced_step_closure *
simple_displaced_step_copy_insn (struct gdbarch *gdbarch,
@@ -973,6 +974,25 @@ default_guess_tracepoint_registers (struct gdbarch *gdbarch,
regcache_raw_supply (regcache, pc_regno, regs);
}
+int
+default_print_insn (bfd_vma memaddr, disassemble_info *info)
+{
+ disassembler_ftype disassemble_fn;
+
+ if (exec_bfd != NULL)
+ {
+ gdb_assert (info->arch == bfd_get_arch (exec_bfd));
+ gdb_assert (info->endian == (bfd_big_endian (exec_bfd)
+ ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE));
+ gdb_assert (info->mach == bfd_get_mach (exec_bfd));
+ }
+ disassemble_fn = disassembler (info->arch, info->endian == BFD_ENDIAN_BIG,
+ info->mach, exec_bfd);
+
+ gdb_assert (disassemble_fn != NULL);
+ return (*disassemble_fn) (memaddr, info);
+}
+
/* -Wmissing-prototypes */
extern initialize_file_ftype _initialize_gdbarch_utils;
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 967a4b1..040afca 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -273,4 +273,6 @@ extern void default_guess_tracepoint_registers (struct gdbarch *gdbarch,
struct regcache *regcache,
CORE_ADDR addr);
+extern int default_print_insn (bfd_vma memaddr, disassemble_info *info);
+
#endif
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index ec9db1c..3d041c6 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1499,7 +1499,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pseudo_register_write (gdbarch, avr_pseudo_register_write);
set_gdbarch_return_value (gdbarch, avr_return_value);
- set_gdbarch_print_insn (gdbarch, print_insn_avr);
set_gdbarch_push_dummy_call (gdbarch, avr_push_dummy_call);
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index c590a91..bfb5d57 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -838,7 +838,6 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 8);
set_gdbarch_unwind_pc (gdbarch, bfin_unwind_pc);
set_gdbarch_frame_align (gdbarch, bfin_frame_align);
- set_gdbarch_print_insn (gdbarch, print_insn_bfin);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index eb39772..e554e24 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -3785,19 +3785,6 @@ cris_gdb_func (struct gdbarch *gdbarch, enum cris_op_type op_type,
}
}
-/* This wrapper is to avoid cris_get_assembler being called before
- exec_bfd has been set. */
-
-static int
-cris_delayed_get_disassembler (bfd_vma addr, struct disassemble_info *info)
-{
- int (*print_insn) (bfd_vma addr, struct disassemble_info *info);
-
- print_insn = cris_get_disassembler (exec_bfd);
- gdb_assert (print_insn != NULL);
- return print_insn (addr, info);
-}
-
/* Originally from <asm/elf.h>. */
typedef unsigned char cris_elf_greg_t[4];
@@ -4134,10 +4121,5 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
- /* FIXME: cagney/2003-08-27: It should be possible to select a CRIS
- disassembler, even when there is no BFD. Does something like
- "gdb; target remote; disassmeble *0x123" work? */
- set_gdbarch_print_insn (gdbarch, cris_delayed_get_disassembler);
-
return gdbarch;
}
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 8744733..c0257bd 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1582,7 +1582,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
}
- set_gdbarch_print_insn (gdbarch, print_insn_frv);
if (frv_abi (gdbarch) == FRV_ABI_FDPIC)
set_gdbarch_convert_from_func_ptr_addr (gdbarch,
frv_convert_from_func_ptr_addr);
diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c
index 5b28275..966a593 100644
--- a/gdb/ft32-tdep.c
+++ b/gdb/ft32-tdep.c
@@ -637,8 +637,6 @@ ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_unwind_pc (gdbarch, ft32_unwind_pc);
- set_gdbarch_print_insn (gdbarch, print_insn_ft32);
-
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 9c827ac..257c39f 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -429,6 +429,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
gdbarch->addr_bits_remove = core_addr_identity;
+ gdbarch->print_insn = default_print_insn;
gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
@@ -621,8 +622,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of addr_bits_remove, invalid_p == 0 */
/* Skip verify of software_single_step, has predicate. */
/* Skip verify of single_step_through_delay, has predicate. */
- if (gdbarch->print_insn == 0)
- log.puts ("\n\tprint_insn");
+ /* Skip verify of print_insn, invalid_p == 0 */
/* Skip verify of skip_trampoline_code, invalid_p == 0 */
/* Skip verify of skip_solib_resolver, invalid_p == 0 */
/* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 753819f..7992cbe 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -643,7 +643,7 @@ F;std::vector<CORE_ADDR>;software_single_step;struct regcache *regcache;regcache
M;int;single_step_through_delay;struct frame_info *frame;frame
# FIXME: cagney/2003-08-28: Need to find a better way of selecting the
# disassembler. Perhaps objdump can handle it?
-f;int;print_insn;bfd_vma vma, struct disassemble_info *info;vma, info;;0;
+f;int;print_insn;bfd_vma vma, struct disassemble_info *info;vma, info;;default_print_insn;;0
f;CORE_ADDR;skip_trampoline_code;struct frame_info *frame, CORE_ADDR pc;frame, pc;;generic_skip_trampoline_code;;0
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 2636a27..229b061 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -3122,8 +3122,6 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Helper for function argument information. */
set_gdbarch_fetch_pointer_argument (gdbarch, hppa_fetch_pointer_argument);
- set_gdbarch_print_insn (gdbarch, print_insn_hppa);
-
/* When a hardware watchpoint triggers, we'll move the inferior past
it by removing all eventpoints; stepping past the instruction
that caused the trigger; reinserting eventpoints; and checking
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index 7d8ed3c..99824b7 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -838,7 +838,6 @@ iq2000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_skip_prologue (gdbarch, iq2000_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_print_insn (gdbarch, print_insn_iq2000);
set_gdbarch_register_type (gdbarch, iq2000_register_type);
set_gdbarch_frame_align (gdbarch, iq2000_frame_align);
set_gdbarch_unwind_sp (gdbarch, iq2000_unwind_sp);
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index bd3e182..84ece3e 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -565,9 +565,6 @@ lm32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_dummy_call (gdbarch, lm32_push_dummy_call);
set_gdbarch_return_value (gdbarch, lm32_return_value);
- /* Instruction disassembler. */
- set_gdbarch_print_insn (gdbarch, print_insn_lm32);
-
lm32_add_reggroups (gdbarch);
set_gdbarch_register_reggroup_p (gdbarch, lm32_register_reggroup_p);
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 7376372..1bc5950 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -2639,9 +2639,6 @@ m32c_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Register set. */
make_regs (gdbarch);
- /* Disassembly. */
- set_gdbarch_print_insn (gdbarch, print_insn_m32c);
-
/* Breakpoints. */
set_gdbarch_breakpoint_kind_from_pc (gdbarch, m32c_breakpoint::kind_from_pc);
set_gdbarch_sw_breakpoint_from_kind (gdbarch, m32c_breakpoint::bp_from_kind);
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 0820af9..2d14ced 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -947,8 +947,6 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Return the unwound PC value. */
set_gdbarch_unwind_pc (gdbarch, m32r_unwind_pc);
- set_gdbarch_print_insn (gdbarch, print_insn_m32r);
-
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 893d9c2..b19ddf7b 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1344,16 +1344,6 @@ m68hc11_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
if (flags & STO_M68HC12_INTERRUPT)
MSYMBOL_SET_RTI (msym);
}
-
-static int
-gdb_print_insn_m68hc11 (bfd_vma memaddr, disassemble_info *info)
-{
- if (info->arch == bfd_arch_m68hc11)
- return print_insn_m68hc11 (memaddr, info);
- else
- return print_insn_m68hc12 (memaddr, info);
-}
-
/* 68HC11/68HC12 register groups.
@@ -1525,7 +1515,6 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
m68hc11_breakpoint::kind_from_pc);
set_gdbarch_sw_breakpoint_from_kind (gdbarch,
m68hc11_breakpoint::bp_from_kind);
- set_gdbarch_print_insn (gdbarch, gdb_print_insn_m68hc11);
m68hc11_add_reggroups (gdbarch);
set_gdbarch_register_reggroup_p (gdbarch, m68hc11_register_reggroup_p);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 7c3bf4c..5b4736d 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1240,10 +1240,6 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_return_in_first_hidden_param_p (gdbarch,
m68k_return_in_first_hidden_param_p);
-
- /* Disassembler. */
- set_gdbarch_print_insn (gdbarch, print_insn_m68k);
-
#if defined JB_PC && defined JB_ELEMENT_SIZE
tdep->jb_pc = JB_PC;
tdep->jb_elt_size = JB_ELEMENT_SIZE;
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 57fe644..d08a913 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -838,8 +838,6 @@ m88k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_iterate_over_regset_sections
(gdbarch, m88k_iterate_over_regset_sections);
- set_gdbarch_print_insn (gdbarch, print_insn_m88k);
-
set_gdbarch_skip_prologue (gdbarch, m88k_skip_prologue);
/* Stack grows downward. */
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 59f94c5..86cb090 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -738,8 +738,6 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 8);
- set_gdbarch_print_insn (gdbarch, print_insn_microblaze);
-
set_gdbarch_write_pc (gdbarch, microblaze_write_pc);
set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc);
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 0f5e10f..1e2526f 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1444,8 +1444,6 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_sw_breakpoint_from_kind (gdbarch,
mn10300_breakpoint::bp_from_kind);
/* decr_pc_after_break? */
- /* Disassembly. */
- set_gdbarch_print_insn (gdbarch, print_insn_mn10300);
/* Stage 2 */
set_gdbarch_return_value (gdbarch, mn10300_return_value);
diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c
index 2972d52..91248cc 100644
--- a/gdb/moxie-tdep.c
+++ b/gdb/moxie-tdep.c
@@ -1142,8 +1142,6 @@ moxie_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_unwind_pc (gdbarch, moxie_unwind_pc);
- set_gdbarch_print_insn (gdbarch, print_insn_moxie);
-
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index d9eebf0..d730e1b 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -997,9 +997,6 @@ msp430_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
msp430_breakpoint::bp_from_kind);
set_gdbarch_decr_pc_after_break (gdbarch, 1);
- /* Disassembly. */
- set_gdbarch_print_insn (gdbarch, print_insn_msp430);
-
/* Frames, prologues, etc. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_skip_prologue (gdbarch, msp430_skip_prologue);
diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c
index 1f94b01..2ab6c02 100644
--- a/gdb/mt-tdep.c
+++ b/gdb/mt-tdep.c
@@ -1174,7 +1174,6 @@ mt_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_sw_breakpoint_from_kind (gdbarch, mt_sw_breakpoint_from_kind);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_print_insn (gdbarch, print_insn_mt);
set_gdbarch_register_type (gdbarch, mt_register_type);
set_gdbarch_register_reggroup_p (gdbarch, mt_register_reggroup_p);
diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c
index f942780..ae84567 100644
--- a/gdb/nds32-tdep.c
+++ b/gdb/nds32-tdep.c
@@ -2161,8 +2161,6 @@ nds32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_align (gdbarch, nds32_frame_align);
frame_base_set_default (gdbarch, &nds32_frame_base);
- set_gdbarch_print_insn (gdbarch, print_insn_nds32);
-
/* Handle longjmp. */
set_gdbarch_get_longjmp_target (gdbarch, nds32_get_longjmp_target);
diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c
index c214078..905d859 100644
--- a/gdb/nios2-tdep.c
+++ b/gdb/nios2-tdep.c
@@ -1772,18 +1772,6 @@ nios2_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
}
}
-/* Implement the print_insn gdbarch method. */
-
-static int
-nios2_print_insn (bfd_vma memaddr, disassemble_info *info)
-{
- if (info->endian == BFD_ENDIAN_BIG)
- return print_insn_big_nios2 (memaddr, info);
- else
- return print_insn_little_nios2 (memaddr, info);
-}
-
-
/* Implement the frame_align gdbarch method. */
static CORE_ADDR
@@ -2357,8 +2345,6 @@ nios2_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame_base_set_default (gdbarch, &nios2_frame_base);
- set_gdbarch_print_insn (gdbarch, nios2_print_insn);
-
/* Enable inferior call support. */
set_gdbarch_push_dummy_call (gdbarch, nios2_push_dummy_call);
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
index 83bb3ec..cfd1856 100644
--- a/gdb/rx-tdep.c
+++ b/gdb/rx-tdep.c
@@ -1117,8 +1117,6 @@ rx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_sw_breakpoint_from_kind (gdbarch, rx_breakpoint::bp_from_kind);
set_gdbarch_skip_prologue (gdbarch, rx_skip_prologue);
- set_gdbarch_print_insn (gdbarch, print_insn_rx);
-
set_gdbarch_unwind_pc (gdbarch, rx_unwind_pc);
set_gdbarch_unwind_sp (gdbarch, rx_unwind_sp);
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index 8139d81..6d68260 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -8040,8 +8040,6 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
}
- set_gdbarch_print_insn (gdbarch, print_insn_s390);
-
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
/* Enable TLS support. */
diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
index 94cf0ca..d231674 100644
--- a/gdb/score-tdep.c
+++ b/gdb/score-tdep.c
@@ -126,15 +126,6 @@ score_register_sim_regno (struct gdbarch *gdbarch, int regnum)
}
#endif
-static int
-score_print_insn (bfd_vma memaddr, struct disassemble_info *info)
-{
- if (info->endian == BFD_ENDIAN_BIG)
- return print_insn_big_score (memaddr, info);
- else
- return print_insn_little_score (memaddr, info);
-}
-
static inst_t *
score7_fetch_inst (struct gdbarch *gdbarch, CORE_ADDR addr, gdb_byte *memblock)
{
@@ -1491,7 +1482,6 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_unwind_sp (gdbarch, score_unwind_sp);
set_gdbarch_unwind_pc (gdbarch, score_unwind_pc);
- set_gdbarch_print_insn (gdbarch, score_print_insn);
switch (target_mach)
{
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 0bc678a..2c2b268 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -2289,7 +2289,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_breakpoint_kind_from_pc (gdbarch, sh_breakpoint_kind_from_pc);
set_gdbarch_sw_breakpoint_from_kind (gdbarch, sh_sw_breakpoint_from_kind);
- set_gdbarch_print_insn (gdbarch, print_insn_sh);
set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);
set_gdbarch_return_value (gdbarch, sh_return_value_nofpu);
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index 33986fd..581b57f 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -2416,8 +2416,6 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_breakpoint_kind_from_pc (gdbarch, sh64_breakpoint_kind_from_pc);
set_gdbarch_sw_breakpoint_from_kind (gdbarch, sh64_sw_breakpoint_from_kind);
-
- set_gdbarch_print_insn (gdbarch, print_insn_sh);
set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);
set_gdbarch_return_value (gdbarch, sh64_return_value);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index fa0e04e..dce8527 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1855,8 +1855,6 @@ sparc32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 8);
- set_gdbarch_print_insn (gdbarch, print_insn_sparc);
-
set_gdbarch_software_single_step (gdbarch, sparc_software_single_step);
set_gdbarch_write_pc (gdbarch, sparc_write_pc);
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index 012b749..156a54f 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -346,14 +346,6 @@ tic6x_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
return tdep->breakpoint;
}
-/* This is the implementation of gdbarch method print_insn. */
-
-static int
-tic6x_print_insn (bfd_vma memaddr, disassemble_info *info)
-{
- return print_insn_tic6x (memaddr, info);
-}
-
static void
tic6x_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
struct dwarf2_frame_state_reg *reg,
@@ -1318,8 +1310,6 @@ tic6x_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Single stepping. */
set_gdbarch_software_single_step (gdbarch, tic6x_software_single_step);
- set_gdbarch_print_insn (gdbarch, tic6x_print_insn);
-
/* Call dummy code. */
set_gdbarch_frame_align (gdbarch, tic6x_frame_align);
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index fd42a35..2db6790 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -1055,8 +1055,6 @@ tilegx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tilegx_breakpoint::bp_from_kind);
set_gdbarch_return_value (gdbarch, tilegx_return_value);
- set_gdbarch_print_insn (gdbarch, print_insn_tilegx);
-
gdbarch_init_osabi (info, gdbarch);
dwarf2_append_unwinders (gdbarch);
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 668635e..087026a 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1463,8 +1463,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_dummy_call (gdbarch, v850_push_dummy_call);
set_gdbarch_skip_prologue (gdbarch, v850_skip_prologue);
- set_gdbarch_print_insn (gdbarch, print_insn_v850);
-
set_gdbarch_frame_align (gdbarch, v850_frame_align);
set_gdbarch_unwind_sp (gdbarch, v850_unwind_sp);
set_gdbarch_unwind_pc (gdbarch, v850_unwind_pc);
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 870d268..a92a35a 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -502,8 +502,6 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_function_start_offset (gdbarch, 2);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- set_gdbarch_print_insn (gdbarch, print_insn_vax);
-
set_gdbarch_unwind_pc (gdbarch, vax_unwind_pc);
frame_base_set_default (gdbarch, &vax_frame_base);
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 7fdfc65..9d91fd5 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -849,8 +849,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_skip_trampoline_code (gdbarch, xstormy16_skip_trampoline_code);
- set_gdbarch_print_insn (gdbarch, print_insn_xstormy16);
-
gdbarch_init_osabi (info, gdbarch);
dwarf2_append_unwinders (gdbarch);
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index 0a4ed37..f9e8584 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -3256,8 +3256,6 @@ xtensa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame_unwind_append_unwinder (gdbarch, &xtensa_unwind);
dwarf2_append_unwinders (gdbarch);
- set_gdbarch_print_insn (gdbarch, print_insn_xtensa);
-
set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
xtensa_add_reggroups (gdbarch);