From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6982 invoked by alias); 18 Sep 2013 16:06:51 -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 6971 invoked by uid 89); 18 Sep 2013 16:06:51 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2013 16:06:51 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8IG6m8D021863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 18 Sep 2013 12:06:48 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8IG6k3E025358; Wed, 18 Sep 2013 12:06:47 -0400 Message-ID: <5239CF96.4050800@redhat.com> Date: Wed, 18 Sep 2013 16:06:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Andrew Burgess CC: gdb-patches@sourceware.org, Pedro Alves Subject: Re: PING: Re: [PATCH] Print for unavailable registers References: <5200F594.3050402@broadcom.com> <5239BD47.2020101@broadcom.com> In-Reply-To: <5239BD47.2020101@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-09/txt/msg00608.txt.bz2 On 09/18/2013 03:48 PM, Andrew Burgess wrote: > On 06/08/2013 2:09 PM, Andrew Burgess wrote: >> Following on from (but unrelated to) this mail: >> http://sourceware.org/ml/gdb-patches/2013-08/msg00170.html >> >> Printing "*value not available*" for unavailable values within >> "info registers" seems inconsistent to me, if we just print an >> unavailable register we'll get "". >> >> The patch below makes "info registers" print "". > > I've re-written this patch, here's the latest version. > > OK to apply? I was waiting for the "" discussion patch to finalize before looking at this one. Looks like only a docs review is missing so that should be soon. > Index: ./gdb/infcmd.c > =================================================================== > RCS file: /cvs/src/src/gdb/infcmd.c,v > retrieving revision 1.335 > diff -u -p -r1.335 infcmd.c > --- ./gdb/infcmd.c 18 Sep 2013 14:02:31 -0000 1.335 > +++ ./gdb/infcmd.c 18 Sep 2013 14:43:13 -0000 > @@ -2030,7 +2030,8 @@ default_print_one_register_info (struct > > if (!value_entirely_available (val)) > { > - fprintf_filtered (file, "*value not available*\n"); > + val_print_unavailable (file); > + fprintf_filtered (file, "\n"); > return; > } > else if (value_optimized_out (val)) Why do we do this instead of just deferring to val_print though? val_print would be able to print partially available registers, for instance. (We'd need to do something about the "raw" printing bits below though.) -- Pedro Alves