This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] rs6000-tdep.c: Use set_gdbarch_print_insn()
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 8 Apr 2002 17:12:04 -0700
- Subject: [PATCH] rs6000-tdep.c: Use set_gdbarch_print_insn()
I've just committed the patch below...
From Jimi X <jimix@watson.ibm.com>:
* rs6000-tdep.c (rs6000_gdbarch_init): Use set_gdbarch_print_insn().
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.45
diff -u -p -r1.45 rs6000-tdep.c
--- rs6000-tdep.c 8 Apr 2002 22:56:46 -0000 1.45
+++ rs6000-tdep.c 8 Apr 2002 23:52:06 -0000
@@ -2536,11 +2536,6 @@ rs6000_gdbarch_init (struct gdbarch_info
gdbarch = gdbarch_alloc (&info, tdep);
power = arch == bfd_arch_rs6000;
- /* Select instruction printer. */
- tm_print_insn = arch == power ? print_insn_rs6000 :
- info.byte_order == BFD_ENDIAN_BIG ? print_insn_big_powerpc :
- print_insn_little_powerpc;
-
/* Choose variant. */
v = find_variant_by_arch (arch, mach);
if (!v)
@@ -2585,6 +2580,14 @@ rs6000_gdbarch_init (struct gdbarch_info
tdep->regoff[i] = off;
off += regsize (v->regs + i, wordsize);
}
+
+ /* Select instruction printer. Note: tm_print_insn is still used by
+ gdbtk (insight), so we set both tm_print_insn and the gdbarch
+ method. */
+ tm_print_insn = arch == power ? print_insn_rs6000 :
+ info.byte_order == BFD_ENDIAN_BIG ? print_insn_big_powerpc :
+ print_insn_little_powerpc;
+ set_gdbarch_print_insn (gdbarch, tm_print_insn);
set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);