Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <aburgess@broadcom.com>
Cc: gdb-patches@sourceware.org, Pedro Alves <palves@redhat.com>
Subject: Re: PING: Re: [PATCH] Print <unavailable> for unavailable registers
Date: Wed, 18 Sep 2013 16:06:00 -0000	[thread overview]
Message-ID: <5239CF96.4050800@redhat.com> (raw)
In-Reply-To: <5239BD47.2020101@broadcom.com>

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 "<unavailable>".
>>
>> The patch below makes "info registers" print "<unavailable>".
> 
> I've re-written this patch, here's the latest version.
> 
> OK to apply?

I was waiting for the "<not saved>" 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


  reply	other threads:[~2013-09-18 16:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 13:09 Andrew Burgess
2013-08-28 15:26 ` PING: " Andrew Burgess
2013-09-18 14:48 ` PING: " Andrew Burgess
2013-09-18 16:06   ` Pedro Alves [this message]
2013-10-16 14:26     ` Andrew Burgess
2013-10-24 19:44       ` Pedro Alves
2013-10-29 13:37         ` Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5239CF96.4050800@redhat.com \
    --to=palves@redhat.com \
    --cc=aburgess@broadcom.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox