From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6296 invoked by alias); 19 Aug 2002 03:07:28 -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 6288 invoked from network); 19 Aug 2002 03:07:27 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 19 Aug 2002 03:07:27 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id 6960910CC3; Sun, 18 Aug 2002 23:05:35 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15712.24703.29805.941875@localhost.redhat.com> Date: Sun, 18 Aug 2002 20:07:00 -0000 To: gdb-patches@sources.redhat.com Subject: [RFA] infcmd.c print vector registers in hex only X-SW-Source: 2002-08/txt/msg00539.txt.bz2 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 2002-08-18 Elena Zannoni * infcmd.c (do_registers_info): Print vector registers in hex format only. Index: infcmd.c =================================================================== RCS file: /cvs/uberbaum/gdb/infcmd.c,v retrieving revision 1.52 diff -u -p -r1.52 infcmd.c --- infcmd.c 16 Aug 2002 00:27:45 -0000 1.52 +++ infcmd.c 19 Aug 2002 02:51:16 -0000 @@ -1632,14 +1632,18 @@ do_registers_info (int regnum, int print } printf_filtered (")"); } - /* Else print as integer in hex and in decimal. */ else { + /* 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 SPARC wants to print even-numbered float regs as doubles