[PATCH v2 3/4] gdb/cli: add '.' as an argument for 'list' command
Eli Zaretskii
eliz@gnu.org
Tue Jun 20 16:22:59 GMT 2023
> From: Bruno Larsen <blarsen@redhat.com>
> Cc: eliz@gnu.org,
> Bruno Larsen <blarsen@redhat.com>
> Date: Tue, 20 Jun 2023 17:52:59 +0200
>
> diff --git a/gdb/NEWS b/gdb/NEWS
> index c5519e320e6..aa14e64e51c 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -85,6 +85,10 @@
> is either the last solitary line printed (if there was one) or around
> the main function.
>
> +* The 'list' command now accepts '.' as an argument, which tells GDB to
> + print the location where the inferior is stopped. If the inferior hasn't
> + started yet, the command will error out.
This part is OK.
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -9151,8 +9151,14 @@ it prints the lines around the function @code{main}.
>
> @item list -
> Print lines just before the lines last printed.
> +
> +@item list .
> +Print the lines surrounding the location that is currently being
> +examined by the user (that is, the lines around the last solitary
> +line printed).
The text in NEWS mentioned the place where the inferior is stopped,
which I think is an important information. This text omits this for
some reason. How about adding it here?
Thanks.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
More information about the Gdb-patches
mailing list