This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] mips gdb fails to detect o32


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]