From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25263 invoked by alias); 20 May 2002 14:23:31 -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 25253 invoked from network); 20 May 2002 14:23:29 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 20 May 2002 14:23:29 -0000 Received: from localhost.redhat.com (remus.sfbay.redhat.com [172.16.27.252]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id HAA01608 for ; Mon, 20 May 2002 07:23:27 -0700 (PDT) Received: by localhost.redhat.com (Postfix, from userid 469) id 3241110FC9; Mon, 20 May 2002 10:22:54 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15593.1725.928607.237135@localhost.redhat.com> Date: Mon, 20 May 2002 07:23:00 -0000 To: gdb-patches@sources.redhat.com Subject: [RFA] rs6000-tdep.c: simplify reg printing code X-SW-Source: 2002-05/txt/msg00818.txt.bz2 This patch simplifies a bit the code for printing vector registers. Elena 2002-05-20 Elena Zannoni * rs6000-tdep.c (rs6000_do_registers_info): Simplify code for printing vector registers. Index: rs6000-tdep.c =================================================================== RCS file: /cvs/uberbaum/gdb/rs6000-tdep.c,v retrieving revision 1.64 diff -u -p -r1.64 rs6000-tdep.c --- rs6000-tdep.c 12 May 2002 02:16:04 -0000 1.64 +++ rs6000-tdep.c 20 May 2002 14:20:31 -0000 @@ -1853,19 +1853,16 @@ rs6000_do_registers_info (int regnum, in } else { - /* Print as integer in hex and in decimal. */ + /* Print the register in hex. */ + val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0, + gdb_stdout, 'x', 1, 0, Val_pretty_default); + /* If not a vector register, print it also in decimal. */ if (!altivec_register_p (i)) { - 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); } - else - /* Print as integer in hex only. */ - val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0, - gdb_stdout, 'x', 1, 0, Val_pretty_default); } printf_filtered ("\n"); }