]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2003-06-26 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Thu, 26 Jun 2003 18:01:58 +0000 (18:01 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 26 Jun 2003 18:01:58 +0000 (18:01 +0000)
* mips-tdep.c (gdb_print_insn_mips): Only explicitly set
info->mach when MIPS16.  Patch suggested by Fred Fish.

gdb/ChangeLog
gdb/mips-tdep.c

index a6f3fd8b1588c5670d91f46a56cc261f44971ef1..cbcbf813b756f79ae723084e2c3b0314f39ac6a9 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2003-06-26  Andrew Cagney  <cagney@redhat.com>
 
        * utils.c (internal_vproblem): Print the problem to a reason
index 4009ca542abd8a556a42feb02e6372a87adb10d5..f39179d3a0fce3ee3e9cc2420947777daaa23805 100644 (file)
@@ -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);