This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Improve "help all"


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: log.bz2
Description: BZip2 compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]