From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25490 invoked by alias); 22 Apr 2003 18:41:46 -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 25483 invoked from network); 22 Apr 2003 18:41:45 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 22 Apr 2003 18:41:45 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3p2/8.9.3) with ESMTP id OAA04258; Tue, 22 Apr 2003 14:40:20 -0400 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id OAA04659; Tue, 22 Apr 2003 14:41:44 -0400 Message-ID: <07ce01c308fe$d6ae2c00$0202040a@catdog> From: "Kris Warkentin" To: "Daniel Jacobowitz" Cc: References: <076701c308f6$2f017eb0$0202040a@catdog> <20030422174522.GA728@nevyn.them.org> <079701c308fa$3c6d0610$0202040a@catdog> <20030422182151.GA7232@nevyn.them.org> Subject: Re: long long considered harmful? Date: Tue, 22 Apr 2003 18:41:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2003-04/txt/msg00253.txt.bz2 > > > This is a target entity isn't it? You've got no business using > > > "double" for a target float. Use the gdb type mechanism instead. > > > > Can you point to an example of how this is done? > > Check out floatformat_to_doublest. You may not even need it if you > only pass the data to supply_register... Exactly. All we do is throw the bits around to supply register. I'm just looking for a way to make the structures the right size without being completely ugly. > > I believe it's padding to handle whether we're dealing with a little or big > > endian target. I'll ask the kernel guys when I find them. Regardless of > > whether it does anything, the structure has to be the appropriate size for > > the kernel to fill in. "Mine is not to reason why, mine is just to do or > > die." > > We're talking about code in the host now though, right? You can not > rely on any structure alignment to match. If any of these must match > target structures, you must use gdbarch and the type mechanism for > them. See gnu-v3-abi.c for an example; or just define the offsets that > you need. Well, at the moment, the only host we build gdb for is i386 and Sparc (Neutrino, Solaris and Win32) but conceivably we might want to build a gdb for Neutrino on ppc or mips or some such. Once again, as far as gdb is concerned, none of it really matters because this is just data coming over the wire (or from a system call) and all it needs to know is which offset into the structure to call supply_register on. Do you think it will be sufficient just to get rid of the long longs? cheers, Kris