From: Joern Rennecke Date: Wed, 22 May 2002 13:17:27 +0000 (+0000) Subject: * sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d5dc1198e39dcf73571b90ca8e4597476cf704a3;p=pf3gnuchains%2Fpf3gnuchains3x.git * sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4 for disassembly. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index b5f5a74cdf..80b10e55dc 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +Wed May 22 14:13:40 2002 J"orn Rennecke + + * sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4 + for disassembly. + 2002-05-22 Thiemo Seufer * mips-opc.c (mips_builtin_opcodes): Add drol, dror macros. diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c index 54b91b7d98..7f403806dd 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;