From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23082 invoked by alias); 4 Apr 2002 15:25:16 -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 23073 invoked from network); 4 Apr 2002 15:25:14 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 4 Apr 2002 15:25:14 -0000 Received: from Hermes.suse.de (Charybdis.suse.de [213.95.15.201]) by Cantor.suse.de (Postfix) with ESMTP id 9E52B1E785 for ; Thu, 4 Apr 2002 17:25:13 +0200 (MEST) Received: from aj by arthur.inka.de with local (Exim 3.34 #1) id 16t96u-0000fc-00; Thu, 04 Apr 2002 17:25:12 +0200 To: Michal Ludvig Cc: gdb Subject: Re: discuss: How to print XMM registers on i386/x86-64 References: <3CAC6E35.8050302@suse.cz> From: Andreas Jaeger Date: Thu, 04 Apr 2002 07:25:00 -0000 In-Reply-To: <3CAC6E35.8050302@suse.cz> (Michal Ludvig's message of "Thu, 04 Apr 2002 17:16:05 +0200") Message-ID: User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00049.txt.bz2 Michal Ludvig writes: > Hi all, > current gdb has a problem with printing xmm registers on i386/x86-64 > architectures. XMM regsters are of type builtin_type_v4sf. In 5.1.1 > the output of 'comand info registers xmm0' was as follows: > > xmm0 0x00102030405060708090a0b0c0d0e0f0 > > Now in current mainline it's completely broken (with the same type): > > xmm0 {f = {0x0, 0x0, 0x0, 0x0}} \ > {f = {5.82303983e-10, 2.77686634e+29, -1.16826016e-09, \ > -5.56616044e+29}} > > If I change the type to builtin_type_v4si I get a more useful output: > > xmm0 {f = {0x30201000, 0x70605040, 0xb0a09080, 0xf0e0d0c0}} \ > {f = {807407616, 1885360192, -1331654528, -253701952}} > > So my question is how to print it? We shouldn't treat XMM registers as > 4xFP, because it can contain 1) two double precision floats, 2) four > single precision floats, 3) from 16 bytes, 8 words, 4 double words, 2 > quadwords or 1 double quadword (128b). > For now gcc won't store more than one FP variable into each register, > ie. we don't need to convert all parts to float. > > I propose to provide an output like it was in 5.1 and create a new > command for exploring these registers from different type's point of > view. For example 'show register xmm0 dw' would print each quarter in > a decimal form (dw stands for doubleword), while 'show register xmm0 > dfp' would print both halves of the register as double precision > floats. That's the way I would go. I'm not sure whether I'd like to see "dw" there but we should use some flag for this. My first thought was extending the print /FMT argument but I'm not sure whether this works. > > We need a working XMM debugging on x86-64 arch, because there it is > the default for FP. Thus I'd like to change the type of xmm registers > to builtin_type_v4si for gdb-5.2 so that it would be at least somehow > useful. In the current state it is not. > > What do you think about these propositions? Thanks for looking into this! Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj