This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Teach -data-list-register-values to not include unavailable registers


Replying for Yao as I wrote this.

On 06/07/2013 03:29 PM, Eli Zaretskii wrote:
>> From: Yao Qi <yao@codesourcery.com>
>> Date: Fri, 7 Jun 2013 20:54:10 +0800
>>
>> This patch adds an option --skip-unavailable to MI command
>> -data-list-register-values, so that unavailable registers are not
>> displayed (on the context of traceframes).
> 
> "Skip unavailable" is double negation.  How about -show-available
> instead?

I think I picked that because "unavailable" terminology is that is
what we've been using throughout GDB's output for such values.
We display then as literal "<unavailable>" (though also
"value not available").  For -show-available, it's
not as clear to me that "available" isn't just the generic english
word -- I'd have to ponder, 'does this include <error ...>,
'<optimized out>' values, etc. (the answer is yes, it does)? (*)
I'm obsessed about it, and this is machine interface anyhow, so
no user sees it.

(*) we seem to be lacking documentation of what all these
"<optimized out>", "<unavailable>" etc., values are.

>>  Display the registers' contents.  @var{fmt} is the format according to
>>  which the registers' contents are to be returned, followed by an optional
>>  list of numbers specifying the registers to display.  A missing list of
>> -numbers indicates that the contents of all the registers must be returned.
>> +numbers indicates that the contents of all the registers must be
>> +returned.  In the context of trace frames, the
>> +@code{--skip-unavailable} option indicates that only available
>> +(collected) registers are returned.
>                          ^^^^^^^^^^^^
> "are to be returned".  And why do you need the first part of that
> sentence, about the "context of trace frames"?  Does it add anything
> to the description?

Not really.  Meanwhile, we've added uses of <unavailable> outside trace
frames, so this it's really better to remove mention of trace frames.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]