This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 13/24] Make "print" and "compile print" support -OPT options
- From: Tom Tromey <tom at tromey dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 03 Jun 2019 13:20:32 -0600
- Subject: Re: [PATCH v2 13/24] Make "print" and "compile print" support -OPT options
- References: <20190530195333.20448-1-palves@redhat.com> <20190530195333.20448-14-palves@redhat.com>
>>>>> "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.
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.
Tom