This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2.1] Introduce the "with" command
On 6/22/19 11:30 AM, Philippe Waroquiers wrote:
> On Wed, 2019-06-19 at 18:20 +0100, Pedro Alves wrote:
>> Here's the updated full patch that incorporates the changes addressing
>> both Eli's and Philippe's comments.
> I quickly re-read the patch and did some trials.
>
Thanks!
> Two small remarks:
> * The tests related to "maint with" are failing.
> It looks like this patch misses the change
> "maint test-settings" to "maint set|show test-settings".
Hmm, with.exp and settings.exp both pass for me. Could you try the
users/palves/cli-options branch? It contains the latest version,
including the change below.
> * Maybe it would be worth expanding slightly the on-line help?
> What about:
>
> (gdb) help with
> Temporarily set SETTING to VALUE, run COMMAND, and restore SETTING.
> Usage: with SETTING [VALUE] [-- COMMAND]
> Usage: w SETTING [VALUE] [-- COMMAND]
> With no COMMAND, repeats the last executed command.
>
> SETTING is any setting you can change with the "set" subcommands.
> Examples:
> with language pascal -- print obj
> with print elements unlimited -- print obj
>
> Multiple settings can be changed using nested with, and abbreviations
> can be used for commands and/or values.
> Example:
> w la p -- w p el u -- p obj
> (gdb)
Sounds good to me, with a change to switch to active voice, to go
with the "changeable" -> "you can change" tweak in the previous round.
Like:
(gdb) help with
Temporarily set SETTING to VALUE, run COMMAND, and restore SETTING.
Usage: with SETTING [VALUE] [-- COMMAND]
Usage: w SETTING [VALUE] [-- COMMAND]
With no COMMAND, repeats the last executed command.
SETTING is any setting you can change with the "set" subcommands.
E.g.:
with language pascal -- print obj
with print elements unlimited -- print obj
You can change multiple settings using nested with, and use
abbreviations for commands and/or values. E.g.:
w la p -- w p el u -- p obj
(gdb)
WDYT?
Thanks,
Pedro Alves