aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2002-05-22 13:17:27 +0000
committerJoern Rennecke <joern.rennecke@embecosm.com>2002-05-22 13:17:27 +0000
commit426e6456c0f627dc7be0b40553f6f2e874540f8c (patch)
treeae91c7f8ce2094013519784f203701fea51bf24e /opcodes
parent005ef3d2e348bddfbefbd3d3f76533fb09b424d8 (diff)
downloadgdb-426e6456c0f627dc7be0b40553f6f2e874540f8c.zip
gdb-426e6456c0f627dc7be0b40553f6f2e874540f8c.tar.gz
gdb-426e6456c0f627dc7be0b40553f6f2e874540f8c.tar.bz2
* sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4
for disassembly.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/sh-dis.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index b5f5a74..80b10e5 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+Wed May 22 14:13:40 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4
+ for disassembly.
+
2002-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* mips-opc.c (mips_builtin_opcodes): Add drol, dror macros.
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index 54b91b7..7f40380 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -301,6 +301,11 @@ print_insn_sh (memaddr, info)
{
case bfd_mach_sh:
target_arch = arch_sh1;
+ /* SH coff object files lack information about the machine type, so
+ we end up with bfd_mach_sh unless it was set explicitly (which
+ could have happended if this is a call from gdb or the simulator.) */
+ if (bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
+ target_arch = arch_sh4;
break;
case bfd_mach_sh2:
target_arch = arch_sh2;