2003-06-26 Andrew Cagney * mips-tdep.c (gdb_print_insn_mips): Only explicitly set info->mach when MIPS16. Patch suggested by Fred Fish. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.221 diff -u -r1.221 mips-tdep.c --- mips-tdep.c 21 Jun 2003 23:14:43 -0000 1.221 +++ mips-tdep.c 26 Jun 2003 17:58:48 -0000 @@ -5270,12 +5270,20 @@ the procedure descriptor exists and the address therein is odd, it's definitely a 16-bit function. Otherwise, we have to just guess that if the address passed in is odd, it's 16-bits. */ + /* FIXME: cagney/2003-06-26: Is this even necessary? The + disassembler needs to be able to locally determine the ISA, and + not rely on GDB. Otherwize the stand-alone 'objdump -d' will not + work. */ if (proc_desc) - info->mach = pc_is_mips16 (PROC_LOW_ADDR (proc_desc)) ? - bfd_mach_mips16 : 0; + { + if (pc_is_mips16 (PROC_LOW_ADDR (proc_desc))) + info->mach = bfd_mach_mips16; + } else - info->mach = pc_is_mips16 (memaddr) ? - bfd_mach_mips16 : 0; + { + if (pc_is_mips16 (memaddr)) + info->mach = bfd_mach_mips16; + } /* Round down the instruction address to the appropriate boundary. */ memaddr &= (info->mach == bfd_mach_mips16 ? ~1 : ~3);