diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-06-26 18:01:47 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-06-26 18:01:47 +0000 |
commit | af04ae77ac755d23fddf145687d1e647363baf81 (patch) | |
tree | 1159dc100d42de2468b6518a028dcc98518f4138 /gdb/mips-tdep.c | |
parent | c2b98ad93ebe2426cc7b71fae099e474fbce8965 (diff) | |
download | binutils-gdb-af04ae77ac755d23fddf145687d1e647363baf81.tar.gz |
2003-06-26 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (gdb_print_insn_mips): Only explicitly set
info->mach when MIPS16. Patch suggested by Fred Fish.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 4009ca542ab..f39179d3a0f 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -5270,12 +5270,20 @@ gdb_print_insn_mips (bfd_vma memaddr, disassemble_info *info) 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); |