From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3797 invoked by alias); 24 Oct 2013 19:44:20 -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 3778 invoked by uid 89); 24 Oct 2013 19:44:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com 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; Thu, 24 Oct 2013 19:44:18 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9OJiGYN009798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Oct 2013 15:44:16 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r9OJiDbe011950; Thu, 24 Oct 2013 15:44:14 -0400 Message-ID: <5269788C.4050607@redhat.com> Date: Thu, 24 Oct 2013 19:44: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 Subject: Re: PING: Re: [PATCH] Print for unavailable registers References: <5200F594.3050402@broadcom.com> <5239BD47.2020101@broadcom.com> <5239CF96.4050800@redhat.com> <525EA208.7000107@broadcom.com> In-Reply-To: <525EA208.7000107@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-10/txt/msg00768.txt.bz2 On 10/16/2013 03:26 PM, Andrew Burgess wrote: > On 18/09/2013 5:06 PM, Pedro Alves wrote: > >>> 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.) > > OK that's a reasonable point. I've rewritten this patch to make use > of the val_print call to print the / . > > For now I unconditionally skip the second attempt to print the value, > the "raw" form, for optimized-out and unavailable values, we might > be able to do better in the future but I was keen to avoid output > like this: "rax: " with the > being repeated. If the value of a register is > partially unavailable, and so we did manage to print something then > it might make sense to try and print the raw form... Yeah, we could print some character like UU or XX or $$ or some such for the unavailable bytes, for example, like, say, printing a 32-bit var: 0011UUUU > > Is this OK to apply? OK. Thanks, -- Pedro Alves