From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14298 invoked by alias); 5 Oct 2002 20:03:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14285 invoked from network); 5 Oct 2002 20:03:45 -0000 Received: from unknown (HELO mail-out1.apple.com) (17.254.0.52) by sources.redhat.com with SMTP; 5 Oct 2002 20:03:45 -0000 Received: from mailgate2.apple.com (A17-129-100-225.apple.com [17.129.100.225]) by mail-out1.apple.com (8.11.3/8.11.3) with ESMTP id g95K3fi01430 for ; Sat, 5 Oct 2002 13:03:41 -0700 (PDT) Received: from scv3.apple.com (scv3.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Sat, 5 Oct 2002 13:03:41 -0700 Received: from molly.local. (vpn-scv-x2-154.apple.com [17.219.193.154]) by scv3.apple.com (8.11.3/8.11.3) with ESMTP id g95K3e306099; Sat, 5 Oct 2002 13:03:40 -0700 (PDT) Date: Sat, 05 Oct 2002 13:03:00 -0000 Subject: Re: [PATCH] Print vector registers in natural format, not hex Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v543) Cc: gdb-patches@sources.redhat.com To: Eli Zaretskii From: Klee Dienes In-Reply-To: <9003-Sat05Oct2002202855+0200-eliz@is.elta.co.il> Message-Id: <8CF3C631-D89D-11D6-9DA9-00039396EEB8@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00150.txt.bz2 The only relevant part of the documentation I noticed was the following: > Some registers have distinct ``raw'' and ``virtual'' data formats. > This > means that the data format in which the register contents are saved by > the operating system is not the same one that your program normally > sees. For example, the registers of the 68881 floating point > coprocessor are always saved in ``extended'' (raw) format, but all C > programs expect to work with ``double'' (virtual) format. In such > cases, @value{GDBN} normally works with the virtual format only (the > format > that makes sense for your program), but the @code{info registers} > command > prints the data in both formats. Fortunately for me, that's exactly what my patch modifies GDB to do (although according my interpretation of the documentation, I should really be testing for (TYPE_CODE_INT) and not (TYPE_CODE_FLOAT || TYPE_VECTOR). But in practice I suspect the two cases are the same. The following documentation patch isn't really related to my patch, but would probably be a good idea regardless: diff -u -r1.23 gdb.texinfo --- gdb.texinfo 2002/09/27 00:36:40 1.23 +++ gdb.texinfo 2002/10/05 20:06:50 @@ -5559,14 +5559,14 @@ @table @code @kindex info registers @item info registers -Print the names and values of all registers except floating-point -registers (in the selected stack frame). +Print the names and values of all registers except floating-point and +vector registers (in the selected stack frame). @kindex info all-registers @cindex floating point registers @item info all-registers Print the names and values of all registers, including floating-point -registers. +and vector registers. @item info registers @var{regname} @dots{} Print the @dfn{relativized} value of each specified register @var{regname}.