aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>2022-04-18 11:21:09 +0200
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>2022-08-25 18:57:25 +0200
commiteffcf7b14467fba7eb36ea2be1b3422eb03d9240 (patch)
treec487373304661919e7851f460bdd7cf823e6a4b4 /gdb/NEWS
parent8b1a24e546fb68d3ea59e10939b32328947cdb99 (diff)
downloadgdb-effcf7b14467fba7eb36ea2be1b3422eb03d9240.zip
gdb-effcf7b14467fba7eb36ea2be1b3422eb03d9240.tar.gz
gdb-effcf7b14467fba7eb36ea2be1b3422eb03d9240.tar.bz2
Allow to document user-defined aliases.
Compared to the previous version, this version fixes the comments reported by Tom Tromey and ensures that the 'help some-user-documented-alias' shows the alias definition to ensure the user understands this is an alias even if specifically documented. When using 'help ALIASNAME', GDB shows the help of the aliased command. This is a good default behaviour. However, GDB alias command allows to define aliases with arguments possibly changing or tuning significantly the behaviour of the aliased command. In such a case, showing the help of the aliased command might not be ideal. This is particularly true when defining an alias as a set of nested 'with' followed by a last command to launch, such as: (gdb) alias pp10 = with print pretty -- with print elements 10 -- print Asking 'help pp10' shows the help of the 'with' command, which is not particularly useful: (gdb) help pp10 with, pp10, w alias pp10 = with print pretty -- with print elements 10 -- print Temporarily set SETTING to VALUE, run COMMAND, and restore SETTING. Usage: with SETTING [VALUE] [-- COMMAND] .... Such an alias can now be documented by the user: (gdb) document pp10 >Pretty printing an expressiong, printing 10 elements. >Usage: pp10 [PRINT-COMMAND-OPTIONS] EXP >See 'help print' for more information. >end (gdb) help pp10 alias pp10 = with print pretty -- with print elements 10 -- print Pretty printing an expressiong, printing 10 elements. Usage: pp10 [PRINT-COMMAND-OPTIONS] EXP See 'help print' for more information. (gdb) When a user-defined alias is documented specifically, help and apropos use the provided alias documentation instead of the documentation of the aliased command. Such a documented alias is also not shown anymore in the help of the aliased command, and the alias is not listed anymore in the help of the aliased command. In particular for cases such as pp10 example above, indicating that pp10 is an alias of the 'with' command is confusing.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 25b771b..dee0ac2 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -99,6 +99,16 @@ maintenance print frame-id [ LEVEL ]
* Changed commands
+document user-defined
+ It is now possible to document user-defined aliases.
+ When a user-defined alias is documented, the help and apropos commands
+ use the provided documentation instead of the documentation of the
+ aliased command.
+ Documenting a user-defined alias is particularly useful when the alias
+ is a set of nested 'with' commands to avoid showing the help of
+ the with command for an alias that will in fact launch the
+ last command given in the nested commands.
+
maintenance info line-table
Add a PROLOGUE-END column to the output which indicates that an
entry corresponds to an address where a breakpoint should be placed