From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1690 invoked by alias); 1 Mar 2003 20:33:20 -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 1662 invoked from network); 1 Mar 2003 20:33:08 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by 172.16.49.205 with SMTP; 1 Mar 2003 20:33:08 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id A5198D34B6; Sat, 1 Mar 2003 11:09:29 -0800 (PST) Date: Sat, 01 Mar 2003 20:33:00 -0000 From: Joel Brobecker To: Mark Kettenis Cc: Michael Elizabeth Chastain , gdb@sources.redhat.com Subject: Re: 8-byte register values on a 32-bit machine Message-ID: <20030301190929.GF11181@gnat.com> References: <200302240235.h1O2Zws05373@duracef.shout.net> <864r6n5hw2.fsf@elgar.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <864r6n5hw2.fsf@elgar.kettenis.dyndns.org> User-Agent: Mutt/1.4i X-SW-Source: 2003-03/txt/msg00009.txt.bz2 > 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. What I have seen as well is GCC an 8 bytes structure over 2 registers (2 fields of 4 bytes, one field on each register). The first register used (and specified in the stabs info) was %ebx, and the next one was sort of consecutive. It was %esi. The only thing is that there are two special registers in the middle (%esp, and %ebp) :-). Because of this, even if we modified GCC to allocate the registers in the same order as the GDB order (or modify the GDB order, if that's possible), we'll still have situations where this is not going to work. I think we've lost the stabs battle. So I started to look into the DWARF2 format, but could not find anything that helps. Does anybody know if this format supports this sort of situation? -- Joel