From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60879 invoked by alias); 3 Mar 2015 16:12:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 60867 invoked by uid 89); 3 Mar 2015 16:12:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp17.uk.ibm.com Received: from e06smtp17.uk.ibm.com (HELO e06smtp17.uk.ibm.com) (195.75.94.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 03 Mar 2015 16:12:42 +0000 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Mar 2015 16:12:38 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp17.uk.ibm.com (192.168.101.147) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 3 Mar 2015 16:12:37 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 49D2C1B08061 for ; Tue, 3 Mar 2015 16:12:54 +0000 (GMT) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t23GCaNs11731454 for ; Tue, 3 Mar 2015 16:12:36 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t23GCZC4009714 for ; Tue, 3 Mar 2015 09:12:36 -0700 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-115.boeblingen.de.ibm.com [9.152.212.115]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t23GCZow009695; Tue, 3 Mar 2015 09:12:35 -0700 From: Andreas Arnez To: gdb-patches@sourceware.org Cc: Ulrich Weigand Subject: [PATCH] S390: Name "invisible" registers with the empty string instead of NULL Date: Tue, 03 Mar 2015 16:12:00 -0000 Message-ID: <87385mxdos.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15030316-0029-0000-0000-00000395C075 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00098.txt.bz2 When adding vector register support to GDB, s390_register_name() was added to suppress the right halves of the first 16 vector registers. However, that function returned NULL instead of an empty string in such a case. This leads to an incomplete list of registers returned by "complete info registers ", because completion stops at the first NULL return value from user_reg_map_regnum_to_name(). gdb/ChangeLog: * s390-linux-tdep.c (s390_register_name): Return empty string instead of NULL for registers that shouldn't be visible. --- gdb/s390-linux-tdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index 2dfd8e4..e60951f 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -269,15 +269,15 @@ regnum_is_vxr_full (struct gdbarch_tdep *tdep, int regnum) && regnum <= tdep->v0_full_regnum + 15); } -/* Return the name of register REGNO. Return NULL for registers that - shouldn't be visible. */ +/* Return the name of register REGNO. Return the empty string for + registers that shouldn't be visible. */ static const char * s390_register_name (struct gdbarch *gdbarch, int regnum) { if (regnum >= S390_V0_LOWER_REGNUM && regnum <= S390_V15_LOWER_REGNUM) - return NULL; + return ""; return tdesc_register_name (gdbarch, regnum); } -- 2.1.4