From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27111 invoked by alias); 21 Jul 2004 21:30:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27098 invoked from network); 21 Jul 2004 21:30:28 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 21 Jul 2004 21:30:28 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BnOeY-0005fM-OF; Wed, 21 Jul 2004 17:29:30 -0400 Date: Wed, 21 Jul 2004 21:30:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] mips-irix SEGV: long doubles are 128 bits long on IRIX Message-ID: <20040721212930.GA21706@nevyn.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sources.redhat.com References: <20040721212522.GP1278@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040721212522.GP1278@gnat.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-07/txt/msg00291.txt.bz2 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 > > * 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