From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16812 invoked by alias); 23 Jan 2008 15:20:40 -0000 Received: (qmail 16801 invoked by uid 22791); 23 Jan 2008 15:20:40 -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; Wed, 23 Jan 2008 15:20:10 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 7348598375; Wed, 23 Jan 2008 15:20:08 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 37CE7980E0; Wed, 23 Jan 2008 15:20:08 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JHhOZ-0002E1-AN; Wed, 23 Jan 2008 10:20:07 -0500 Date: Wed, 23 Jan 2008 15:20:00 -0000 From: Daniel Jacobowitz To: Thiago Jung Bauermann Cc: Mark Kettenis , Luis Machado , gdb-patches@sourceware.org Subject: Re: Printing decimal128 types out of registers Message-ID: <20080123152007.GA8286@caradoc.them.org> Mail-Followup-To: Thiago Jung Bauermann , Mark Kettenis , Luis Machado , gdb-patches@sourceware.org References: <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> <20080121175413.GA25254@caradoc.them.org> <1201101039.11950.56.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1201101039.11950.56.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/msg00552.txt.bz2 On Wed, Jan 23, 2008 at 01:10:38PM -0200, Thiago Jung Bauermann wrote: > > 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. > > That would be the Power6 processor. In Linux, I can make the distinction > using the auxiliary vector: > > AT_PLATFORM: power6 > > Or even better: > > AT_HWCAP: dfp arch_2_05 ic_snoop smt mmu fpu altivec ppc64 ppc32 > > I don't know if this would work for other OSs (and I don't know if other > OSs have or will have DFP support). Is this a good method to determine > when to show the pseudo registers? Here's one (of many) possible ways you could do it. Define an appropriate property in an XML file for Power6, and add that to the list of built-in descriptions just like the existing ones. In ppc-linux-nat.c and in gdbserver, check the auxv vector for the dfp capability. If it's present, return the Power6 description. Other non-Linux targets can handle this in the appropriate way for each target. For the gdbserver part you'd probably want to wait until Ulrich's biarch patches go in; that may simplify it. If this is too complicated, I wouldn't argue against a patch that just added them if the floating point regsiters are present. Seems like it won't be useful on a lot of processors though. -- Daniel Jacobowitz CodeSourcery