Re: [PATCH v2.1] Introduce the "with" command

Philippe Waroquiers
2019-06-22T10:30:45Z

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.

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".
* 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)Â

Thanks

Philippe