This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PING: Re: [PATCH] Print <unavailable> for unavailable registers
- From: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>
- Cc: gdb-patches at sourceware dot org, Pedro Alves <palves at redhat dot com>
- Date: Wed, 18 Sep 2013 17:06:46 +0100
- Subject: Re: PING: Re: [PATCH] Print <unavailable> for unavailable registers
- Authentication-results: sourceware.org; auth=none
- References: <5200F594 dot 3050402 at broadcom dot com> <5239BD47 dot 2020101 at broadcom dot 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