This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH]: Multi-arch print_insn for 68HC11
- From: Stephane Carrez <Stephane dot Carrez at worldnet dot fr>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 06 Mar 2002 21:10:57 +0100
- Subject: [PATCH]: Multi-arch print_insn for 68HC11
Hi!
The HC11 port was using the old method (tm_print_insn) to install its
handler to disassemble code. This patch fixes that to now use the
set_gdbarch_print_insn function.
I've committed on mainline and 5_2 branch.
Stephane
2002-03-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* m68hc11-tdep.c (_initialize_m68hc11_tdep): Don't set tm_print_insn.
(m68hc11_gdbarch_init): But use set_gdbarch_print_insn instead.
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.2298.2.3
diff -u -p -r1.2298.2.3 ChangeLog
--- ChangeLog 2002/03/06 04:46:08 1.2298.2.3
+++ ChangeLog 2002/03/06 20:04:42
@@ -1,3 +1,8 @@
+2002-03-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * m68hc11-tdep.c (_initialize_m68hc11_tdep): Don't set tm_print_insn.
+ (m68hc11_gdbarch_init): But use set_gdbarch_print_insn instead.
+
2002-03-05 Andrew Cagney <ac131313@redhat.com>
* MAINTAINERS (Past Maintainers): Add Frank Ch. Eigler.
Index: m68hc11-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v
retrieving revision 1.16
diff -u -p -r1.16 m68hc11-tdep.c
--- m68hc11-tdep.c 2002/01/20 18:05:51 1.16
+++ m68hc11-tdep.c 2002/03/06 20:04:44
@@ -1,5 +1,5 @@
/* Target-dependent code for Motorola 68HC11 & 68HC12
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Stephane Carrez, stcarrez@worldnet.fr
This file is part of GDB.
@@ -1155,6 +1155,7 @@ m68hc11_gdbarch_init (struct gdbarch_inf
set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_breakpoint_from_pc (gdbarch, m68hc11_breakpoint_from_pc);
set_gdbarch_stack_align (gdbarch, m68hc11_stack_align);
+ set_gdbarch_print_insn (gdbarch, gdb_print_insn_m68hc11);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
@@ -1166,8 +1167,6 @@ _initialize_m68hc11_tdep (void)
{
register_gdbarch_init (bfd_arch_m68hc11, m68hc11_gdbarch_init);
register_gdbarch_init (bfd_arch_m68hc12, m68hc11_gdbarch_init);
- if (!tm_print_insn) /* Someone may have already set it */
- tm_print_insn = gdb_print_insn_m68hc11;
add_com ("regs", class_vars, show_regs, "Print all registers");
}