Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Fred Fish <fnf@intrinsity.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Don't clobber info->mach in gdb_print_insn_mips
Date: Thu, 26 Jun 2003 18:00:00 -0000	[thread overview]
Message-ID: <3EFB34C7.8010409@redhat.com> (raw)
In-Reply-To: <3EFA0FA5.70603@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 49 bytes --]

I've checked this in trunk and 6 branch.

Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1394 bytes --]

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.

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);

      reply	other threads:[~2003-06-26 18:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-23 14:14 Fred Fish
2003-06-23 20:38 ` Andrew Cagney
2003-06-23 21:39   ` Fred Fish
2003-06-23 21:40     ` Andrew Cagney
2003-06-24  0:51       ` Fred Fish
2003-06-25 21:47         ` Andrew Cagney
2003-06-26 18:00           ` Andrew Cagney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EFB34C7.8010409@redhat.com \
    --to=ac131313@redhat.com \
    --cc=fnf@intrinsity.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox