From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 624 invoked by alias); 20 Aug 2002 15:04:20 -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 617 invoked from network); 20 Aug 2002 15:04:18 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 20 Aug 2002 15:04:18 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A1B4C3D6E; Tue, 20 Aug 2002 11:04:17 -0400 (EDT) Message-ID: <3D625A71.5060900@ges.redhat.com> Date: Tue, 20 Aug 2002 08:04:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020810 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Elena Zannoni Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] infcmd.c print vector registers in hex only References: <15712.24703.29805.941875@localhost.redhat.com> <15714.21367.161116.563645@localhost.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-08/txt/msg00586.txt.bz2 > Elena Zannoni writes: > > > > Doing this simplification allows to get rid of a function (for now, > > more later) in rs6000-tdep.c. Such function is entirely a duplicate of > > do_registers_info, except for this patch. > > > > The reason behind this is that vector registers use up a lot of > > screen real estate, especially the 128 bit ones (altivec registers). > > > > Elena > > > > To clarify: > With this patch each register is printed like this: > (gdb) info reg vr0 > vr0 {uint128 = 0x00000000000000000000000000000000, v4_float = {0x0, > 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x0, 0x0, > 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v16_int8 = {0x0 }} > > while w/o the patch: > (gdb) info reg vr0 > vr0 {uint128 = 0x00000000000000000000000000000000, v4_float = {0x0, > 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x0, 0x0, > 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v16_int8 = {0x0 }} { > uint128 = 0x00000000000000000000000000000000, v4_float = {0, 0, 0, 0}, > v4_int32 = {0, 0, 0, 0}, v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0}, > v16_int8 = '\0' } Er, yes. The old style just looks silly :-) > > + /* Print the register in hex. */ > > val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0, > > gdb_stdout, 'x', 1, 0, Val_pretty_default); > > - printf_filtered ("\t"); > > - val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0, > > - gdb_stdout, 0, 1, 0, Val_pretty_default); > > + /* If not a vector register, print it also in decimal. */ > > + if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0) > > + { > > + printf_filtered ("\t"); > > + val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0, > > + gdb_stdout, 0, 1, 0, Val_pretty_default); > > + } The (old) comment should probably, also, be fixed. That isn't printing the value in decimal. enjoy, Andrew