This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[PATCH] gdb 4.18 fix for disassembly
- To: kingdon at redhat dot com, "David S. Miller" <davem at redhat dot com>
- Subject: [PATCH] gdb 4.18 fix for disassembly
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Mon, 22 Nov 1999 11:59:29 +0100
- Cc: gdb-patches at sourceware dot cygnus dot com
Hi!
gdb we shipped does not disassemble correctly instructions outside of the v8
ISA (e.g. v8plus, v8plusa).
This patch fixes it. In cvs gdb this code changed again so it might well
work just fine, haven't checked yet.
1999-11-22 Jakub Jelinek <jakub@redhat.com>
* sparc-tdep.c (_initialize_sparc_tdep): Don't force machine to the
compiled-in default unless it is sparclite or sparclet - otherwise
gdb messes up disassembly of any architecture higher than
bfd_mach_sparc.
--- gdb/sparc-tdep.c.jj Mon Dec 14 00:28:45 1998
+++ gdb/sparc-tdep.c Mon Nov 22 11:40:11 1999
@@ -1929,7 +1929,11 @@ sparc_target_architecture_hook (ap)
void
_initialize_sparc_tdep ()
{
- tm_print_insn = gdb_print_insn_sparc;
+ if (TM_PRINT_INSN_MACH == bfd_mach_sparc_sparclite
+ || TM_PRINT_INSN_MACH == bfd_mach_sparc_sparclet)
+ tm_print_insn = gdb_print_insn_sparc;
+ else
+ tm_print_insn = print_insn_sparc;
tm_print_insn_info.mach = TM_PRINT_INSN_MACH; /* Selects sparc/sparclite */
target_architecture_hook = sparc_target_architecture_hook;
}
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.18 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________