[RFAv2 3/3] NEWS and documentation for leading-args related concept and commands.

Eli Zaretskii eliz@gnu.org
Tue Aug 6 15:11:00 GMT 2019


> From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
> Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
> Date: Mon,  5 Aug 2019 22:51:59 +0200
> 
> diff --git a/gdb/NEWS b/gdb/NEWS
> index da641cb598..54464dd62d 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -72,6 +72,18 @@ w SETTING [VALUE] [-- COMMAND]
>  maint with SETTING [VALUE] [-- COMMAND]
>    Like "with", but works with "maintenance set" settings.
>  
> +set leading-args COMMAND [LEADING-ARGS...]
> +show leading-args [COMMAND]
> +set enable-leading-args [on|off]
> +show enable-leading-args
> +  GDB can now automatically prepend leading args to a command or alias.
> +  This allows to set default arguments or options for the GDB commands
> +  or define easier to use aliases.
> +  For example, 'set leading-args backtrace -full -frame-arguments all'
> +  ensures that backtrace will automatically use the options -full
> +  -frame-arguments all, without having to retype them for each backtrace
> +  command.
> +
>  set may-call-functions [on|off]
>  show may-call-functions
>    This controls whether GDB will attempt to call functions in
> @@ -150,6 +162,12 @@ info sources [-dirname | -basename] [--] [REGEXP]
>    allow to restrict matching respectively to the dirname and basename
>    parts of the files.
>  
> +alias [-a] [--] ALIAS = COMMAND [LEADING-ARGS...]
> +  The alias command can now directly define leading-args
> +  to prepend to arguments provided by the user on the command line.
> +  See 'set leading-args COMMAND [LEADING-ARGS...]' for more
> +  information about leading args concept.
> +
>  show style
>    The "show style" and its subcommands are now styling
>    a style name in their output using its own style, to help

This part is OK.

> +If you repetitively use the same arguments or options for a command,
> +you can tell @value{GDBN} to automatically prepend these arguments
> +or options to the arguments you type explicitely.
                                        ^^^^^^^^^^^
"explicitly"

> +(@value{GDBP}) set leading-args bt_ALL -entry-values both -frame-arg all \
> +-past-main -past-entry -full

Please indent the second line a few spaces.

> +@smallexample
> +(@value{GDBP}) alias bt_ALL = backtrace -entry-values both -frame-arg all \
> +-past-main -past-entry -full

Likewise.

> +Use @code{set leading-args @var{command}} (without giving @var{LEADING-ARGS})
                                                                  ^^^^^^^^^^^^
"leading-args", in lower-case.

> +@item set enable-leading-args @r{[}on|off@r{]}
> +@itemx show enable-leading-args

These commands should have @kindex entries.

Thanks.



More information about the Gdb-patches mailing list