From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30118 invoked by alias); 1 Mar 2003 13:35:56 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30111 invoked from network); 1 Mar 2003 13:35:55 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.212) by 172.16.49.205 with SMTP; 1 Mar 2003 13:35:55 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6/8.12.5) with ESMTP id h21DZjRe004233; Sat, 1 Mar 2003 14:35:45 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6/8.12.6) with ESMTP id h21DZjRo018908; Sat, 1 Mar 2003 14:35:45 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6/8.12.6/Submit) id h21DZfxW018905; Sat, 1 Mar 2003 14:35:41 +0100 (CET) To: Michael Elizabeth Chastain Cc: gdb@sources.redhat.com Subject: Re: 8-byte register values on a 32-bit machine References: <200302240235.h1O2Zws05373@duracef.shout.net> From: Mark Kettenis Date: Sat, 01 Mar 2003 13:35:00 -0000 In-Reply-To: Michael Elizabeth Chastain's message of "Sun, 23 Feb 2003 20:35:58 -0600" Message-ID: <864r6n5hw2.fsf@elgar.kettenis.dyndns.org> X-SW-Source: 2003-03/txt/msg00001.txt.bz2 Michael Elizabeth Chastain writes: > I saw a regression in gdb.base/store.exp this week: > > gdb.base/store.exp: new check struct 4 > PASS -> FAIL > > This happens with gcc 2.95.3 -gdwarf-2. > > This happens because gcc 2.95.3 puts an 8-byte variable into a pair of > 4-byte registers. (gcc 3.2.2 puts the variable into memory so the > problem never arises -- but I bet it will come back for things like > FORTRAN complex numbers, which are very natural for register pairs). Please see the thread starting with: http://sources.redhat.com/ml/gdb/2003-02/msg00007.html for a related discussion. > But I suspect that gcc 2.95.3 tells us about just one register and that > we can't win. But gdb can at least say "hmmm, you are trying to print 8 > bytes from reg0, I can't do that", rather than print 4 bytes of correct > information and 4 bytes of rat poison. I think that would be acceptable > support for 2.95.3. Yup, that's defenitely what it does for stabs, and from looking at the code, it does it for other debug formats as well (including dwarf-2). Right now, GDB interprets this as that the variable is stored in consecutive registers starting at the register number indicated by the debug info. I have a strong suspicion that there are several GDB targets that rely on this behaviour. However, it isn't working for the i386 since GCC allocates the registers in an order that's different from the order that GDB uses.