From 426e6456c0f627dc7be0b40553f6f2e874540f8c Mon Sep 17 00:00:00 2001 From: Joern Rennecke Date: Wed, 22 May 2002 13:17:27 +0000 Subject: * sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4 for disassembly. --- opcodes/sh-dis.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'opcodes/sh-dis.c') 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; -- cgit v1.1