[PATCH v2 13/24] Make "print" and "compile print" support -OPT options

Pedro Alves palves@redhat.com
Tue Jun 4 21:59:00 GMT 2019


On 6/3/19 8:20 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> Pedro> This patch adds support for "print -option optval --", etc.
> Pedro> Likewise for "compile print".
> 
> Pedro> We'll get:
> 
> Pedro> (gdb) help print
> Pedro> Print value of expression EXP.
> Pedro> Usage: print [[OPTION]... --] [/FMT] [EXP]
> 
> Pedro> Options:
> Pedro>   -address [on|off]
> Pedro>     Set printing of addresses.
> 
> Pedro>   -array [on|off]
> Pedro>     Set pretty formatting of arrays.
> [...]
> Pedro> -null-stop [on|off]
> Pedro>     Set printing of char arrays to stop at first null char.
> 
> I assume -null-stop is out-dented due to a cut-and-paste error with the
> email, but I wanted to double-check that there isn't a bug here.

Indeed, there's no bug here.  Noticed this in the v1 submission but forgot
to fix it for v2...  Sorry about that.

> 
> 
> Pedro> I want to highlight the comment above about "--".
> [...]
> 
> I think this approach makes sense, and it addresses the one thing that
> made me hesitate about this idea.

Awesome, that's great to hear.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list