This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] mips-irix SEGV: long doubles are 128 bits long on IRIX
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at gnat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 21 Jul 2004 17:29:30 -0400
- Subject: Re: [RFA] mips-irix SEGV: long doubles are 128 bits long on IRIX
- References: <20040721212522.GP1278@gnat.com>
On Wed, Jul 21, 2004 at 02:25:22PM -0700, Joel Brobecker wrote:
> The problem is that GDB thinks that long double variables are 64 bits
> long, but they are in fact 128 bits long. The discrepancy causes GDB
> to fail to find the associated format for type doublest (which is
> a typedef of long double), and then call floatformat_is_valid() with
> a NULL format... See values.c:unpack_double():
>
> if (!floatformat_is_valid (floatformat_from_type (type), valaddr))
> {
> *invp = 1;
> return 0.0;
> }
>
> The attached patch should fixes the problem (on 032, the SGI compiler
> claims that "long double" is not supported on implicitly changes them
> into plain "double" types (64bit), while GCC says they are 64bit).
>
> 2004-07-21 Joel Brobecker <brobecker@gnat.com>
>
> * mips-irix-tdep.c: #include "mips-tdep.h".
> (mips_irix_init_abi): Set size of long double to 128 bits
> for N32 and N64 ABIs.
> * Makefile.in (mips-irix-tdep.o): Add dependency on mips-tdep.h.
>
> Tested on mips-irix, fixes the problem above and many other FAILs.
> OK to commit?
I can't find the right CVS tree at the moment to double-check, but I
think this is true for mips-linux and embedded MIPS using N32/N64 also.
--
Daniel Jacobowitz