Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: gdb-patches@sources.redhat.com, cagney@redhat.com
Subject: [RFC] mips gdb fails to detect o32
Date: Wed, 07 Aug 2002 17:42:00 -0000	[thread overview]
Message-ID: <3D51BA0F.9A825A12@redhat.com> (raw)

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

Well, I just discovered that gdb is failing to detect the o32 abi
when debugging the output of the native Irix compiler.  This patch
seems to help.

The idea here is, if it's not n32, then if it is MIPS_ARCH_2,
then it must be o32.  However, I've no idea if that's right --
I just know it works so far as I've been able to test it.

Unfortunately, I haven't been able to test it against EABI, 
and I haven't been able to test it against gcc, because gcc
doesn't generate o32.

So... anybody have any better ideas?

[-- Attachment #2: patch3.diff --]
[-- Type: text/plain, Size: 696 bytes --]

2002-08-07  Michael Snyder  <msnyder@redhat.com>

	* mips-tdep.c (mips_gdbarch_init): Detect 032.

Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.92
diff -p -r1.92 mips-tdep.c
*** mips-tdep.c	8 Aug 2002 00:26:51 -0000	1.92
--- mips-tdep.c	8 Aug 2002 00:33:15 -0000
*************** mips_gdbarch_init (struct gdbarch_info i
*** 4412,4417 ****
--- 4412,4419 ----
      default:
        if ((elf_flags & EF_MIPS_ABI2))
  	mips_abi = MIPS_ABI_N32;
+       else if ((elf_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_2)
+ 	mips_abi = MIPS_ABI_O32;
        else
  	mips_abi = MIPS_ABI_UNKNOWN;
        break;

             reply	other threads:[~2002-08-08  0:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-07 17:42 Michael Snyder [this message]
2002-08-07 17:46 ` Daniel Jacobowitz
2002-08-07 17:57   ` Michael Snyder
2002-08-07 18:01     ` Daniel Jacobowitz
2002-08-07 19:49 ` Andrew Cagney
2002-08-07 20:00   ` Michael Snyder
2002-08-07 20:11     ` Andrew Cagney

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=3D51BA0F.9A825A12@redhat.com \
    --to=msnyder@redhat.com \
    --cc=cagney@redhat.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