* Improve "help all"
@ 2006-10-27 19:40 Vladimir Prus
2006-10-28 11:29 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Vladimir Prus @ 2006-10-27 19:40 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
Hi,
at the moment gdb's "help all" command is not as helpful as it could be
because:
1. It's not mentioned in the output of "help".
2. The output of "help all" lacks any structure -- like visual grouping by
classes.
3. The prefix commands are printed in weird order. For example, the
"append" and "append binary" commands are printed a couple of screens apart.
This patch fixes all that, and also mentions "apropos" in the output
of "help".
OK?
- Volodya
* commands.h (enum command_class): Use different
values for class_deprecated and class_run.
* cli/cli-decode.c: (print_help_for_command): New.
(apropos_cmd): Use the above.
(help_list): Mention 'help all'
and 'apropos' when printing top-level help.
(help_all): Print the class name before printing
commands in that class. Don't print prefix commands
here, instead pass recurse flag to help_cmd_list.
Print list of unclassified commands at the end.
(help_cmd_list): When recursing, use all_commands class.
Recurse only if the class of the command matches.
[-- Attachment #2: help.diff --]
[-- Type: text/x-diff, Size: 5953 bytes --]
Index: command.h
===================================================================
RCS file: /cvs/src/src/gdb/command.h,v
retrieving revision 1.54
diff -u -r1.54 command.h
--- command.h 17 Dec 2005 22:33:59 -0000 1.54
+++ command.h 27 Oct 2006 19:39:27 -0000
@@ -30,7 +30,7 @@
enum command_class
{
/* Special args to help_list */
- class_deprecated, all_classes = -2, all_commands = -1,
+ class_deprecated = -3, all_classes = -2, all_commands = -1,
/* Classes of commands */
no_class = -1, class_run = 0, class_vars, class_stack,
class_files, class_support, class_info, class_breakpoint, class_trace,
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.58
diff -u -r1.58 cli-decode.c
--- cli/cli-decode.c 17 Dec 2005 22:40:17 -0000 1.58
+++ cli/cli-decode.c 27 Oct 2006 19:39:28 -0000
@@ -46,6 +46,11 @@
int *nfound);
static void help_all (struct ui_file *stream);
+
+static void
+print_help_for_command (struct cmd_list_element *c, char *prefix, int recurse,
+ struct ui_file *stream);
+
\f
/* Set the callback function for the specified command. For each both
the commands callback and func() are set. The latter set to a
@@ -687,14 +692,8 @@
returnvalue=re_search(regex,c->name,strlen(c->name),0,strlen(c->name),NULL);
if (returnvalue >= 0)
{
- /* Stolen from help_cmd_list. We don't directly use
- * help_cmd_list because it doesn't let us print out
- * single commands
- */
- fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
- print_doc_line (stream, c->doc);
- fputs_filtered ("\n", stream);
- returnvalue=0; /*Set this so we don't print it again.*/
+ print_help_for_command (c, prefix,
+ 0 /* don't recurse */, stream);
}
}
if (c->doc != NULL && returnvalue != 0)
@@ -702,13 +701,8 @@
/* Try to match against documentation */
if (re_search(regex,c->doc,strlen(c->doc),0,strlen(c->doc),NULL) >=0)
{
- /* Stolen from help_cmd_list. We don't directly use
- * help_cmd_list because it doesn't let us print out
- * single commands
- */
- fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
- print_doc_line (stream, c->doc);
- fputs_filtered ("\n", stream);
+ print_help_for_command (c, prefix,
+ 0 /* don't recurse */, stream);
}
}
/* Check if this command has subcommands */
@@ -845,6 +839,9 @@
cmdtype1);
wrap_here ("");
fprintf_filtered (stream, "that class.");
+
+ fprintf_filtered (stream, "\n\
+Type \"help all\" for the list of all commands.");
}
fprintf_filtered (stream, "\nType \"help%s\" followed by %scommand name ",
@@ -855,6 +852,8 @@
fputs_filtered ("full ", stream);
wrap_here ("");
fputs_filtered ("documentation.\n", stream);
+ fputs_filtered ("Type \"apropos word\" to search "
+ "for commands related to \"word\".\n", stream);
fputs_filtered ("Command name abbreviations are allowed if unambiguous.\n",
stream);
}
@@ -864,19 +863,41 @@
{
struct cmd_list_element *c;
extern struct cmd_list_element *cmdlist;
+ int seen_unclassified = 0;
for (c = cmdlist; c; c = c->next)
{
if (c->abbrev_flag)
continue;
- /* If this is a prefix command, print it's subcommands */
- if (c->prefixlist)
- help_cmd_list (*c->prefixlist, all_commands, c->prefixname, 0, stream);
-
/* If this is a class name, print all of the commands in the class */
- else if (c->func == NULL)
- help_cmd_list (cmdlist, c->class, "", 0, stream);
+
+ if (c->func == NULL)
+ {
+ fprintf_filtered (stream, "\nCommand class: %s\n\n", c->name);
+ help_cmd_list (cmdlist, c->class, "", 1, stream);
+ }
}
+
+ /* While it's expected that all commands are in some class,
+ as a safety measure, we'll print commands outside of any
+ class at the end. */
+
+ for (c = cmdlist; c; c = c->next)
+ {
+ if (c->abbrev_flag)
+ continue;
+
+ if (c->class == no_class)
+ {
+ if (!seen_unclassified)
+ {
+ fprintf_filtered (stream, "\nUnclassified commands\n\n");
+ seen_unclassified = 1;
+ }
+ print_help_for_command (c, "", 1, stream);
+ }
+ }
+
}
/* Print only the first line of STR on STREAM. */
@@ -909,6 +930,26 @@
ui_out_text (uiout, line_buffer);
}
+/* Print one-line help for command C.
+ If RECURSE is non-zero, also print one-line descriptions
+ of all prefixed subcommands. */
+static void
+print_help_for_command (struct cmd_list_element *c, char *prefix, int recurse,
+ struct ui_file *stream)
+{
+ fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
+ print_doc_line (stream, c->doc);
+ fputs_filtered ("\n", stream);
+
+ if (recurse
+ && c->prefixlist != 0
+ && c->abbrev_flag == 0)
+ /* Subcommands of a prefix command typically have 'all_commands'
+ as class. If we pass CLASS to recursive invocation,
+ most often we won't see anything. */
+ help_cmd_list (*c->prefixlist, all_commands, c->prefixname, 1, stream);
+}
+
/*
* Implement a help command on command list LIST.
* RECURSE should be non-zero if this should be done recursively on
@@ -932,20 +973,14 @@
struct cmd_list_element *c;
for (c = list; c; c = c->next)
- {
+ {
if (c->abbrev_flag == 0 &&
(class == all_commands
|| (class == all_classes && c->func == NULL)
|| (class == c->class && c->func != NULL)))
{
- fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
- print_doc_line (stream, c->doc);
- fputs_filtered ("\n", stream);
+ print_help_for_command (c, prefix, recurse, stream);
}
- if (recurse
- && c->prefixlist != 0
- && c->abbrev_flag == 0)
- help_cmd_list (*c->prefixlist, class, c->prefixname, 1, stream);
}
}
\f
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Improve "help all"
2006-10-27 19:40 Improve "help all" Vladimir Prus
@ 2006-10-28 11:29 ` Eli Zaretskii
2006-10-28 11:58 ` Vladimir Prus
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2006-10-28 11:29 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Fri, 27 Oct 2006 23:40:26 +0400
>
> at the moment gdb's "help all" command is not as helpful as it could be
> because:
>
> 1. It's not mentioned in the output of "help".
> 2. The output of "help all" lacks any structure -- like visual grouping by
> classes.
> 3. The prefix commands are printed in weird order. For example, the
> "append" and "append binary" commands are printed a couple of screens apart.
>
> This patch fixes all that, and also mentions "apropos" in the output
> of "help".
Thanks.
The idea sounds very good to me, but could you please post the output
of "help all" after applying the patch, so the improved results are
clearly visible? It's hard to judge that based only on the code
changes, and at least I cannot easily build a patched version where
I'm typing this.
> diff -u -r1.54 command.h
> --- command.h 17 Dec 2005 22:33:59 -0000 1.54
> +++ command.h 27 Oct 2006 19:39:27 -0000
> @@ -30,7 +30,7 @@
> enum command_class
> {
> /* Special args to help_list */
> - class_deprecated, all_classes = -2, all_commands = -1,
> + class_deprecated = -3, all_classes = -2, all_commands = -1,
> /* Classes of commands */
> no_class = -1, class_run = 0, class_vars, class_stack,
> class_files, class_support, class_info, class_breakpoint, class_trace,
I suggest to simply move class_deprecated after no_class, so that the
compiler gives it a value. We don't really care about the value in
that case, do we?
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Improve "help all"
2006-10-28 11:29 ` Eli Zaretskii
@ 2006-10-28 11:58 ` Vladimir Prus
2006-10-28 12:26 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Vladimir Prus @ 2006-10-28 11:58 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
On Saturday 28 October 2006 15:28, Eli Zaretskii wrote:
> > From: Vladimir Prus <vladimir@codesourcery.com>
> > Date: Fri, 27 Oct 2006 23:40:26 +0400
> >
> > at the moment gdb's "help all" command is not as helpful as it could be
> > because:
> >
> > 1. It's not mentioned in the output of "help".
> > 2. The output of "help all" lacks any structure -- like visual grouping
> > by classes.
> > 3. The prefix commands are printed in weird order. For example, the
> > "append" and "append binary" commands are printed a couple of screens
> > apart.
> >
> > This patch fixes all that, and also mentions "apropos" in the output
> > of "help".
>
> Thanks.
>
> The idea sounds very good to me, but could you please post the output
> of "help all" after applying the patch, so the improved results are
> clearly visible? It's hard to judge that based only on the code
> changes, and at least I cannot easily build a patched version where
> I'm typing this.
Archived output is attached.
>
> > diff -u -r1.54 command.h
> > --- command.h 17 Dec 2005 22:33:59 -0000 1.54
> > +++ command.h 27 Oct 2006 19:39:27 -0000
> > @@ -30,7 +30,7 @@
> > enum command_class
> > {
> > /* Special args to help_list */
> > - class_deprecated, all_classes = -2, all_commands = -1,
> > + class_deprecated = -3, all_classes = -2, all_commands = -1,
> > /* Classes of commands */
> > no_class = -1, class_run = 0, class_vars, class_stack,
> > class_files, class_support, class_info, class_breakpoint, class_trace,
>
> I suggest to simply move class_deprecated after no_class, so that the
> compiler gives it a value. We don't really care about the value in
> that case, do we?
I believe that all 'special' classes should be negative and class_deprecated
is a bit special too ;-)
- Volodya
[-- Attachment #2: log.bz2 --]
[-- Type: application/x-bzip2, Size: 8835 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Improve "help all"
2006-10-28 11:58 ` Vladimir Prus
@ 2006-10-28 12:26 ` Eli Zaretskii
2006-10-28 15:29 ` Daniel Jacobowitz
2006-10-31 12:15 ` Vladimir Prus
0 siblings, 2 replies; 14+ messages in thread
From: Eli Zaretskii @ 2006-10-28 12:26 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 28 Oct 2006 15:57:57 +0400
> Cc: gdb-patches@sources.redhat.com
>
> Archived output is attached.
Thanks. It looks fine to me.
Perhaps we should assign classes to the 3 unclassified commands that
appear near the end. I think they all should go where `set' is, since
that's where their corresponding `set' commands are.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Improve "help all"
2006-10-28 12:26 ` Eli Zaretskii
@ 2006-10-28 15:29 ` Daniel Jacobowitz
2006-10-28 18:57 ` Eli Zaretskii
2006-10-31 12:11 ` Vladimir Prus
2006-10-31 12:15 ` Vladimir Prus
1 sibling, 2 replies; 14+ messages in thread
From: Daniel Jacobowitz @ 2006-10-28 15:29 UTC (permalink / raw)
To: gdb-patches
On Sat, Oct 28, 2006 at 02:26:19PM +0200, Eli Zaretskii wrote:
> > From: Vladimir Prus <vladimir@codesourcery.com>
> > Date: Sat, 28 Oct 2006 15:57:57 +0400
> > Cc: gdb-patches@sources.redhat.com
> >
> > Archived output is attached.
>
> Thanks. It looks fine to me.
>
> Perhaps we should assign classes to the 3 unclassified commands that
> appear near the end. I think they all should go where `set' is, since
> that's where their corresponding `set' commands are.
Perhaps a strategic assertion when adding commands?
Here's a couple of other things we noticed during the discussion that
prompted this patch - lesser improvements than mentioning "apropos"
prominently, I think:
- The help output doesn't mention which class a command is in; this
might be useful, for finding related commands.
- I didn't even know "help all" existed until now. I couldn't find
it in the manual, either.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Improve "help all"
2006-10-28 15:29 ` Daniel Jacobowitz
@ 2006-10-28 18:57 ` Eli Zaretskii
2006-10-31 12:11 ` Vladimir Prus
1 sibling, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2006-10-28 18:57 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
> Date: Sat, 28 Oct 2006 11:29:29 -0400
> From: Daniel Jacobowitz <drow@false.org>
>
> - I didn't even know "help all" existed until now. I couldn't find
> it in the manual, either.
It should definitely be added.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Improve "help all"
2006-10-28 15:29 ` Daniel Jacobowitz
2006-10-28 18:57 ` Eli Zaretskii
@ 2006-10-31 12:11 ` Vladimir Prus
2006-10-31 12:30 ` Mark Kettenis
1 sibling, 1 reply; 14+ messages in thread
From: Vladimir Prus @ 2006-10-31 12:11 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]
Daniel Jacobowitz wrote:
> On Sat, Oct 28, 2006 at 02:26:19PM +0200, Eli Zaretskii wrote:
>> > From: Vladimir Prus <vladimir@codesourcery.com>
>> > Date: Sat, 28 Oct 2006 15:57:57 +0400
>> > Cc: gdb-patches@sources.redhat.com
>> >
>> > Archived output is attached.
>>
>> Thanks. It looks fine to me.
>>
>> Perhaps we should assign classes to the 3 unclassified commands that
>> appear near the end. I think they all should go where `set' is, since
>> that's where their corresponding `set' commands are.
>
> Perhaps a strategic assertion when adding commands?
>
> Here's a couple of other things we noticed during the discussion that
> prompted this patch - lesser improvements than mentioning "apropos"
> prominently, I think:
>
> - The help output doesn't mention which class a command is in; this
> might be useful, for finding related commands.
The attached patch implements it. The output I get is:
(gdb) help step
Step program until it reaches a different source line.
Argument N means do this N times (or till program stops for another
reason).
Run "help running" for the list of all commands in this class.
This patch would require changing "breakpoint" command that already suggests
to use "help breakpoints" in its own help string -- I'll do this later if
this patch is approved.
OK?
- Volodya
* cli/cli-decode.c (help_cmd): Find and mention the class
of commands.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: show_class.diff --]
[-- Type: text/x-diff; name="show_class.diff", Size: 2667 bytes --]
? a.c
? help.diff
? show_class.diff
Index: cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.59
diff -u -r1.59 cli-decode.c
--- cli-decode.c 31 Oct 2006 11:45:41 -0000 1.59
+++ cli-decode.c 31 Oct 2006 12:09:05 -0000
@@ -731,6 +731,7 @@
help_cmd (char *command, struct ui_file *stream)
{
struct cmd_list_element *c;
+ struct cmd_list_element *c2;
extern struct cmd_list_element *cmdlist;
if (!command)
@@ -765,30 +766,47 @@
fputs_filtered (c->doc, stream);
fputs_filtered ("\n", stream);
- if (c->prefixlist == 0 && c->func != NULL)
- return;
- fprintf_filtered (stream, "\n");
-
- /* If this is a prefix command, print it's subcommands */
- if (c->prefixlist)
- help_list (*c->prefixlist, c->prefixname, all_commands, stream);
-
- /* If this is a class name, print all of the commands in the class */
- if (c->func == NULL)
- help_list (cmdlist, "", c->class, stream);
+ if (c->prefixlist != 0 || c->func == NULL)
+ {
+ /* This is either prefix command or class. */
+ fprintf_filtered (stream, "\n");
+ /* If this is a prefix command, print it's subcommands */
+ if (c->prefixlist)
+ help_list (*c->prefixlist, c->prefixname, all_commands, stream);
+
+ /* If this is a class name, print all of the commands in the class */
+ if (c->func == NULL)
+ help_list (cmdlist, "", c->class, stream);
+ }
+
if (c->hook_pre || c->hook_post)
fprintf_filtered (stream,
- "\nThis command has a hook (or hooks) defined:\n");
-
+ "\nThis command has a hook (or hooks) defined:\n");
+
if (c->hook_pre)
fprintf_filtered (stream,
- "\tThis command is run after : %s (pre hook)\n",
- c->hook_pre->name);
+ "\tThis command is run after : %s (pre hook)\n",
+ c->hook_pre->name);
if (c->hook_post)
fprintf_filtered (stream,
- "\tThis command is run before : %s (post hook)\n",
- c->hook_post->name);
+ "\tThis command is run before : %s (post hook)\n",
+ c->hook_post->name);
+
+ if (c->func != NULL)
+ {
+ /* This is either ordinary command or prefix command, but not
+ a command class. Find the name of the class it belongs
+ too. */
+ for (c2 = cmdlist;;c2 = c2->next)
+ if (c2->class == c->class && c2->func == NULL && c2->prefixlist == 0)
+ break;
+
+ if (c2)
+ fprintf_filtered (stream,
+ "\nRun \"help %s\" for the list of all "
+ "commands in this class.\n", c2->name);
+ }
}
/*
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Improve "help all"
2006-10-31 12:11 ` Vladimir Prus
@ 2006-10-31 12:30 ` Mark Kettenis
2006-10-31 22:28 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Mark Kettenis @ 2006-10-31 12:30 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
> Daniel Jacobowitz wrote:
>
> > On Sat, Oct 28, 2006 at 02:26:19PM +0200, Eli Zaretskii wrote:
> >> > From: Vladimir Prus <vladimir@codesourcery.com>
> >> > Date: Sat, 28 Oct 2006 15:57:57 +0400
> >> > Cc: gdb-patches@sources.redhat.com
> >> >
> >> > Archived output is attached.
> >>
> >> Thanks. It looks fine to me.
> >>
> >> Perhaps we should assign classes to the 3 unclassified commands that
> >> appear near the end. I think they all should go where `set' is, since
> >> that's where their corresponding `set' commands are.
> >
> > Perhaps a strategic assertion when adding commands?
> >
> > Here's a couple of other things we noticed during the discussion that
> > prompted this patch - lesser improvements than mentioning "apropos"
> > prominently, I think:
> >
> > - The help output doesn't mention which class a command is in; this
> > might be useful, for finding related commands.
>
>
> The attached patch implements it. The output I get is:
>
> (gdb) help step
> Step program until it reaches a different source line.
> Argument N means do this N times (or till program stops for another
> reason).
>
> Run "help running" for the list of all commands in this class.
>
> This patch would require changing "breakpoint" command that already
> suggests
> to use "help breakpoints" in its own help string -- I'll do this later if
> this patch is approved.
I really don't like this. The extra lines convey almost no useful
information to me, and just clutter up my display.
Mark
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Improve "help all"
2006-10-31 12:30 ` Mark Kettenis
@ 2006-10-31 22:28 ` Eli Zaretskii
2006-11-01 9:51 ` Vladimir Prus
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2006-10-31 22:28 UTC (permalink / raw)
To: Mark Kettenis; +Cc: ghost, gdb-patches
> Date: Tue, 31 Oct 2006 13:29:41 +0100 (CET)
> From: "Mark Kettenis" <mark.kettenis@xs4all.nl>
> Cc: gdb-patches@sources.redhat.com
> > >
> > > - The help output doesn't mention which class a command is in; this
> > > might be useful, for finding related commands.
> >
> >
> > The attached patch implements it. The output I get is:
> >
> > (gdb) help step
> > Step program until it reaches a different source line.
> > Argument N means do this N times (or till program stops for another
> > reason).
> >
> > Run "help running" for the list of all commands in this class.
> >
> > This patch would require changing "breakpoint" command that already
> > suggests
> > to use "help breakpoints" in its own help string -- I'll do this later if
> > this patch is approved.
>
> I really don't like this.
Me neither. How about this output instead:
(gdb) help step
Step program until it reaches a different source line.
Argument N means do this N times (or till program stops for another reason).
(This command belongs to the class `running'.)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Improve "help all"
2006-10-31 22:28 ` Eli Zaretskii
@ 2006-11-01 9:51 ` Vladimir Prus
2006-11-01 20:16 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Vladimir Prus @ 2006-11-01 9:51 UTC (permalink / raw)
To: gdb-patches
Eli Zaretskii wrote:
>> Date: Tue, 31 Oct 2006 13:29:41 +0100 (CET)
>> From: "Mark Kettenis" <mark.kettenis@xs4all.nl>
>> Cc: gdb-patches@sources.redhat.com
>> > >
>> > > - The help output doesn't mention which class a command is in; this
>> > > might be useful, for finding related commands.
>> >
>> >
>> > The attached patch implements it. The output I get is:
>> >
>> > (gdb) help step
>> > Step program until it reaches a different source line.
>> > Argument N means do this N times (or till program stops for another
>> > reason).
>> >
>> > Run "help running" for the list of all commands in this class.
>> >
>> > This patch would require changing "breakpoint" command that already
>> > suggests
>> > to use "help breakpoints" in its own help string -- I'll do this later
>> > if this patch is approved.
>>
>> I really don't like this.
>
> Me neither. How about this output instead:
>
> (gdb) help step
> Step program until it reaches a different source line.
> Argument N means do this N times (or till program stops for another
> reason).
> (This command belongs to the class `running'.)
So:
- you changed wording (and I trust you on this)
- you remove a newline.
I'm not sure I understand the motivation for lumping everything in one text
block, for the sake of saving a single line. But if that's the general
agreement, I can change the patch to produce the above output?
Will it be OK then?
- Volodya
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Improve "help all"
2006-11-01 9:51 ` Vladimir Prus
@ 2006-11-01 20:16 ` Eli Zaretskii
2006-11-01 22:50 ` Mark Kettenis
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2006-11-01 20:16 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
> From: Vladimir Prus <ghost@cs.msu.su>
> Date: Wed, 01 Nov 2006 12:50:55 +0300
> >> >
> >> > (gdb) help step
> >> > Step program until it reaches a different source line.
> >> > Argument N means do this N times (or till program stops for another
> >> > reason).
> >> >
> >> > Run "help running" for the list of all commands in this class.
> >> >
> >> > This patch would require changing "breakpoint" command that already
> >> > suggests
> >> > to use "help breakpoints" in its own help string -- I'll do this later
> >> > if this patch is approved.
> >>
> >> I really don't like this.
> >
> > Me neither. How about this output instead:
> >
> > (gdb) help step
> > Step program until it reaches a different source line.
> > Argument N means do this N times (or till program stops for another
> > reason).
> > (This command belongs to the class `running'.)
>
>
> So:
> - you changed wording (and I trust you on this)
> - you remove a newline.
My goal was not to minimize output, it was to reach an agreement as to
how to provide the information you thought would be useful in a more
palatable way, in the hope that both you and Mark agree (and no one
else objects).
Here's another suggestion, maybe people will like it better:
(gdb) help step
Command: `step'; class: `running'.
Step program until it reaches a different source line.
Argument N means do this N times (or till program stops for another
reason).
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Improve "help all"
2006-11-01 20:16 ` Eli Zaretskii
@ 2006-11-01 22:50 ` Mark Kettenis
2006-11-02 4:19 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Mark Kettenis @ 2006-11-01 22:50 UTC (permalink / raw)
To: eliz; +Cc: ghost, gdb-patches
> Date: Wed, 01 Nov 2006 22:16:30 +0200
> From: Eli Zaretskii <eliz@gnu.org>
>
> > From: Vladimir Prus <ghost@cs.msu.su>
> > Date: Wed, 01 Nov 2006 12:50:55 +0300
> > >> >
> > >> > (gdb) help step
> > >> > Step program until it reaches a different source line.
> > >> > Argument N means do this N times (or till program stops for another
> > >> > reason).
> > >> >
> > >> > Run "help running" for the list of all commands in this class.
> > >> >
> > >> > This patch would require changing "breakpoint" command that already
> > >> > suggests
> > >> > to use "help breakpoints" in its own help string -- I'll do this later
> > >> > if this patch is approved.
> > >>
> > >> I really don't like this.
> > >
> > > Me neither. How about this output instead:
> > >
> > > (gdb) help step
> > > Step program until it reaches a different source line.
> > > Argument N means do this N times (or till program stops for another
> > > reason).
> > > (This command belongs to the class `running'.)
> >
> >
> > So:
> > - you changed wording (and I trust you on this)
> > - you remove a newline.
>
> My goal was not to minimize output, it was to reach an agreement as to
> how to provide the information you thought would be useful in a more
> palatable way, in the hope that both you and Mark agree (and no one
> else objects).
>
> Here's another suggestion, maybe people will like it better:
>
> (gdb) help step
> Command: `step'; class: `running'.
> Step program until it reaches a different source line.
> Argument N means do this N times (or till program stops for another
> reason).
To be honest, I just think this class information isn't particular
useful, and shouldn't be in the online help at all.
Mark
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Improve "help all"
2006-11-01 22:50 ` Mark Kettenis
@ 2006-11-02 4:19 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2006-11-02 4:19 UTC (permalink / raw)
To: Mark Kettenis; +Cc: ghost, gdb-patches
> Date: Wed, 1 Nov 2006 23:49:59 +0100 (CET)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> CC: ghost@cs.msu.su, gdb-patches@sources.redhat.com
>
> To be honest, I just think this class information isn't particular
> useful, and shouldn't be in the online help at all.
But Vladimir does have a point: without it, how will the user ever
know that "help running" will show related commands? Are you saying
that class-level help commands like "help running" should not be in
GDB?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Improve "help all"
2006-10-28 12:26 ` Eli Zaretskii
2006-10-28 15:29 ` Daniel Jacobowitz
@ 2006-10-31 12:15 ` Vladimir Prus
1 sibling, 0 replies; 14+ messages in thread
From: Vladimir Prus @ 2006-10-31 12:15 UTC (permalink / raw)
To: gdb-patches
Eli Zaretskii wrote:
>> From: Vladimir Prus <vladimir@codesourcery.com>
>> Date: Sat, 28 Oct 2006 15:57:57 +0400
>> Cc: gdb-patches@sources.redhat.com
>>
>> Archived output is attached.
>
> Thanks. It looks fine to me.
I've committed this one. Thanks.
- Volodya
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2006-11-02 4:19 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-27 19:40 Improve "help all" Vladimir Prus
2006-10-28 11:29 ` Eli Zaretskii
2006-10-28 11:58 ` Vladimir Prus
2006-10-28 12:26 ` Eli Zaretskii
2006-10-28 15:29 ` Daniel Jacobowitz
2006-10-28 18:57 ` Eli Zaretskii
2006-10-31 12:11 ` Vladimir Prus
2006-10-31 12:30 ` Mark Kettenis
2006-10-31 22:28 ` Eli Zaretskii
2006-11-01 9:51 ` Vladimir Prus
2006-11-01 20:16 ` Eli Zaretskii
2006-11-01 22:50 ` Mark Kettenis
2006-11-02 4:19 ` Eli Zaretskii
2006-10-31 12:15 ` Vladimir Prus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox