diff mbox

[7/7] gdb: Extend help text for 'list' command.

Message ID 20151210100755.GA11555@embecosm.com
State New
Headers show

Commit Message

Andrew Burgess Dec. 10, 2015, 10:07 a.m. UTC
* Pedro Alves <palves@redhat.com> [2015-11-26 12:38:41 +0000]:

> On 11/25/2015 12:34 AM, Andrew Burgess wrote:
> > Reference the 'listsize' setting in the help text for the 'list' command
> > to help users find this setting.
> > 
> > gdb/ChangeLog:
> > 
> > 	* cli/cli-cmds.c (_initialize_cli_cmds): Extend help text for
> > 	'list' command.
> 
> LGTM, but probably Eli should take a look.

Eli, any feedback?

Thanks,
Andrew

---

Reference the 'listsize' setting in the help text for the 'list' command
to help users find this setting.

gdb/ChangeLog:

        * cli/cli-cmds.c (_initialize_cli_cmds): Extend help text for
        'list' command.
---
 gdb/ChangeLog      | 5 +++++
 gdb/cli/cli-cmds.c | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

Comments

Eli Zaretskii Dec. 10, 2015, 4:24 p.m. UTC | #1
> Date: Thu, 10 Dec 2015 10:07:55 +0000
> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Cc: Pedro Alves <palves@redhat.com>
> 
> * Pedro Alves <palves@redhat.com> [2015-11-26 12:38:41 +0000]:
> 
> > LGTM, but probably Eli should take a look.
> 
> Eli, any feedback?

Some, see below.

> @@ -1901,7 +1901,11 @@ Lines can be specified in these ways:\n\
>    FILE:FUNCTION, to distinguish among like-named static functions.\n\
>    *ADDRESS, to list around the line containing that address.\n\
>  With two args if one is empty it stands for ten lines away from \
> -the other arg."));
> +the other arg.\n\
> +\n\
> +By default when a single location is given list displays ten lines,\n\
> +this can be changed using \"set listsize\", and the current value\n\
> +shown by using \"show listsize\"."));

Some commas are missing here, which makes this difficult to read.
Suggest to fix as follows:

  With two args, if one is empty, it stands for ten lines away from
  the other arg.

  By default, when a single location is given, display ten lines.
  This can be changed using "set listsize", and the current value
  can be shown using "show listsize".

Thanks.
diff mbox

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 278acb5..d9e91c2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@ 
 2015-11-24  Andrew Burgess  <andrew.burgess@embecosm.com>

+	* cli/cli-cmds.c (_initialize_cli_cmds): Extend help text for
+	'list' command.
+
+2015-11-24  Andrew Burgess  <andrew.burgess@embecosm.com>
+
        * cli/cli-cmds.c (list_command): Add an error when trying to use
        '-' to scan read off the start of the source file.

diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 5e7ef0a..0b3b091 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1901,7 +1901,11 @@  Lines can be specified in these ways:\n\
   FILE:FUNCTION, to distinguish among like-named static functions.\n\
   *ADDRESS, to list around the line containing that address.\n\
 With two args if one is empty it stands for ten lines away from \
-the other arg."));
+the other arg.\n\
+\n\
+By default when a single location is given list displays ten lines,\n\
+this can be changed using \"set listsize\", and the current value\n\
+shown by using \"show listsize\"."));

   add_com_alias ("l", "list", class_files, 1);