aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Larsen <blarsen@redhat.com>2023-06-20 16:57:38 +0200
committerBruno Larsen <blarsen@redhat.com>2023-07-14 10:58:18 +0200
commita4e5901bb1681d1d36e49697e680fc98e7a10442 (patch)
treea72e6a3899951af1ab2b81cbcfd2b4f410c5ef3a
parentf52625f1f29a87e94aa9d40e1b76be2d0ecedc10 (diff)
downloadgdb-a4e5901bb1681d1d36e49697e680fc98e7a10442.zip
gdb-a4e5901bb1681d1d36e49697e680fc98e7a10442.tar.gz
gdb-a4e5901bb1681d1d36e49697e680fc98e7a10442.tar.bz2
gdb/doc: document '+' argument for 'list' command
The command 'list' has accepted the argument '+' for many years already, but this option wasn't documented either in the texinfo docs or in the help text for the command. This commit documents it. Reviewed-By: Eli Zaretskii <eliz@gnu.org> Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r--gdb/cli/cli-cmds.c1
-rw-r--r--gdb/doc/gdb.texinfo3
2 files changed, 4 insertions, 0 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 3a1902a..0fa24fd 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -2806,6 +2806,7 @@ and send its output to SHELL_COMMAND."));
List specified function or line.\n\
With no argument, lists ten more lines after or around previous listing.\n\
\"list .\" lists ten lines arond where the inferior is stopped.\n\
+\"list +\" lists the ten lines following a previous ten-line listing.\n\
\"list -\" lists the ten lines before a previous ten-line listing.\n\
One argument specifies a line, and ten lines are listed around that line.\n\
Two arguments with comma between specify starting and ending lines to list.\n\
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 20c9b24..cd86da5 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -9148,6 +9148,9 @@ Stack}), this prints lines centered around that line. If no
@code{list} command has been used and no solitary line was printed,
it prints the lines around the function @code{main}.
+@item list +
+Same as using with no arguments.
+
@item list -
Print lines just before the lines last printed.