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]

Re: [RFA] mips-irix SEGV: long doubles are 128 bits long on IRIX


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


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