This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Ping ? Thanks Philippe (patch attached rebased on current master) On Sun, 2019-09-29 at 17:31 +0200, Philippe Waroquiers wrote: > Ping > Thanks > Philippe > > On Sun, 2019-09-15 at 21:26 +0200, Philippe Waroquiers wrote: > > Allow the user to define default leading args for commands and aliases. > > > > This patch series implements, tests and documents the following commands: > > > > set leading-args COMMAND [LEADING-ARGS...] > > show leading-args [COMMAND] > > set enable-leading-args [on|off] > > show enable-leading-args > > > > > > It also changes the alias command to be: > > alias [-a] [--] ALIAS = COMMAND [LEADING-ARGS...] > > > > > > Using the above leading-args commands and arguments, you can > > define default arguments for commands or define powerful aliases. > > > > For example: > > > > alias bt_ALL = backtrace -entry-values both -frame-arg all -past-main -past-entry -full > > > > defines the alias bt_ALL that will give as much information as possible > > in a backtrace. > > > > Leading args can usefully be combined with the 'with' command, such as: > > > > Make "wLapPeu" an alias of 2 nested "with": > > alias wLapPeu = with language pascal -- with print elements unlimited -- > > > > or have an alias pp10 to pretty print an expression with a maximum of > > 10 elements: > > > > alias pp10 = with print pretty -- with print elem 10 -- print > > > > This patch series also adds a completer for 'alias'. > > > > > > This is the 3rd version ot the patch series. > > > > Compared to the second version, it handles the preliminary comments > > of Pedro (and is rebased to the last master). > > I have for the moment kept the wording 'leading-args' but can change > > it to default-args if that is preferrable. > > The reason I have used leading-args is because these are default leading > > args: the user can add specific arguments after these leading args. > > > > For what concerns changing 'alias -a' to 'alias -abbreviation": > > This can for sure be done (and be backward compatible). This can however > > be done as a separate patch (I still also need to do a similar change > > for the 'qcs' flags). > > > > The second version changes were: > > * Removed the = separator between COMMAND and LEADING-ARGS > > * Converted alias command to use the option framework. > > * Show the leading args of aliases in 'help aliases'. > > > > Note 1: a preliminary version of this idea (using a command called > > 'add-args') was discussed in > > https://sourceware.org/ml/gdb-patches/2019-06/msg00395.html > > where Tom suggested to make it more GDB like, using 'set' command. > > > > Note 2: Following another comment of Tom, there is no '=' character > > to separate COMMAND from its leading args. > > If ever this would be ambiguous in some cases, we could introduce > > an optional '=' character to separate COMMAND from its LEADING-ARGS. > > Similarly, the alias command has no separator between COMMAND > > and its LEADING-ARGS. > > > > > >
Attachment:
patch_ping.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |