aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
commitf532ab94387d1bc47de619ae08ead522753d89fa (patch)
treeb78c81b61f5f0d4f2e0096afc2f137bdb01da716 /gdb
parent39503f82427e22ed8e04d986ccdc8562091ec62e (diff)
downloadgdb-f532ab94387d1bc47de619ae08ead522753d89fa.zip
gdb-f532ab94387d1bc47de619ae08ead522753d89fa.tar.gz
gdb-f532ab94387d1bc47de619ae08ead522753d89fa.tar.bz2
Use disassemble.c:disassembler select h8300 disassembler
opcodes/disassble.c:disassembler select h8300 disassembler like this, if (mach == bfd_mach_h8300h || mach == bfd_mach_h8300hn) disassemble = print_insn_h8300h; else if (mach == bfd_mach_h8300s || mach == bfd_mach_h8300sn || mach == bfd_mach_h8300sx || mach == bfd_mach_h8300sxn) disassemble = print_insn_h8300s; else disassemble = print_insn_h8300; which is the same as what gdb/h8300-tdpe.c does, switch (info.bfd_arch_info->mach) { case bfd_mach_h8300: ... set_gdbarch_print_insn (gdbarch, print_insn_h8300); case bfd_mach_h8300h: case bfd_mach_h8300hn: ... set_gdbarch_print_insn (gdbarch, print_insn_h8300h); case bfd_mach_h8300s: case bfd_mach_h8300sn: ... set_gdbarch_print_insn (gdbarch, print_insn_h8300s); so we can leave disassble.c:disassembler doing the selection. gdb: 2017-05-24 Yao Qi <yao.qi@linaro.org> * h8300-tdep.c (h8300_gdbarch_init): Don't call set_gdbarch_print_insn.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/h8300-tdep.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fa6cf2c..f3b88e1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2017-05-24 Yao Qi <yao.qi@linaro.org>
+ * h8300-tdep.c (h8300_gdbarch_init): Don't call
+ set_gdbarch_print_insn.
+
+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.
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 7b260b1..1e8bde1 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1275,7 +1275,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_return_value (gdbarch, h8300_return_value);
- set_gdbarch_print_insn (gdbarch, print_insn_h8300);
break;
case bfd_mach_h8300h:
case bfd_mach_h8300hn:
@@ -1296,7 +1295,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
}
set_gdbarch_return_value (gdbarch, h8300h_return_value);
- set_gdbarch_print_insn (gdbarch, print_insn_h8300h);
break;
case bfd_mach_h8300s:
case bfd_mach_h8300sn:
@@ -1317,7 +1315,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
}
set_gdbarch_return_value (gdbarch, h8300h_return_value);
- set_gdbarch_print_insn (gdbarch, print_insn_h8300s);
break;
case bfd_mach_h8300sx:
case bfd_mach_h8300sxn:
@@ -1338,7 +1335,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
}
set_gdbarch_return_value (gdbarch, h8300h_return_value);
- set_gdbarch_print_insn (gdbarch, print_insn_h8300s);
break;
}