From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17796 invoked by alias); 21 Jan 2008 17:54:37 -0000 Received: (qmail 17773 invoked by uid 22791); 21 Jan 2008 17:54:36 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Jan 2008 17:54:16 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 8EF3898375; Mon, 21 Jan 2008 17:54:14 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 6D64B98022; Mon, 21 Jan 2008 17:54:14 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JH0qb-0006e4-Av; Mon, 21 Jan 2008 12:54:13 -0500 Date: Mon, 21 Jan 2008 17:54:00 -0000 From: Daniel Jacobowitz To: Thiago Jung Bauermann , Mark Kettenis Cc: Luis Machado , gdb-patches@sourceware.org Subject: Re: Printing decimal128 types out of registers Message-ID: <20080121175413.GA25254@caradoc.them.org> Mail-Followup-To: Thiago Jung Bauermann , Mark Kettenis , Luis Machado , gdb-patches@sourceware.org References: <1200670954.10815.1.camel@gargoyle> <20080119000423.GA15057@caradoc.them.org> <1200927274.32125.36.camel@localhost.localdomain> <200801211730.m0LHUGbu021315@brahms.sibelius.xs4all.nl> <1194460412.6686.34.camel@localhost> <1200596592.27321.20.camel@gargoyle> <1200598580.32125.11.camel@localhost.localdomain> <1200670954.10815.1.camel@gargoyle> <20080119000423.GA15057@caradoc.them.org> <1200927274.32125.36.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200801211730.m0LHUGbu021315@brahms.sibelius.xs4all.nl> <1200927274.32125.36.camel@localhost.localdomain> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00513.txt.bz2 On Mon, Jan 21, 2008 at 12:54:34PM -0200, Thiago Jung Bauermann wrote: > Yes, even for software decimal float implementations the calling > convention for PowerPC. is to put _Decimal128 in a pair of float > registers This, by itself, does not mean we need to be able to display two registers as a _Decimal128. We will still be able to display a named argument in two registers as _Decimal128, because the debug information will (presumably) show it as two pieces in two registers using DW_OP_piece. There's no way to do math on a _Decimal128 value in two FP registers without the hardware support. So I suggest we not have $dl0 except on hardware where the GDB user might look at the next instruction, see that it operates on register dl0, and want to check the value of that register. > I was talking to Luis about this, and he suggested an approach other > than using pseudo registers: create a way to make GDB consider two > consecutive registers as contiguous data. Since there are other types > that are also passed in consecutive registers (e.g., long long, > soft-float, IBM lon double), this mechanism would be more useful. I > think this is a good idea. This is like stepping backwards in time. We used to treat consecutive registers as a big data blob and it was a terrible mess ... if you want to examine typed multi-register values, I suggest leaving any "consecutive" requirement out of the picture. On Mon, Jan 21, 2008 at 06:30:16PM +0100, Mark Kettenis wrote: > > Perhaps some syntax could be created, like: > > > > (gdb) print {_Decimal128} $f2,$f3 > > $1 = 1.2 > > > > What do you think? > > I'm not sure how this would fit into the expression parser. t might > get really ugly. Definitely agreed. Maybe an explicit command to create a name for a group of registers in order, using the same underlying mechanism we use for DWARF. -- Daniel Jacobowitz CodeSourcery