Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: FYI: fix PR gdb/8869
Date: Wed, 12 Aug 2009 23:00:00 -0000	[thread overview]
Message-ID: <m3ab24psp6.fsf@fleche.redhat.com> (raw)
In-Reply-To: <200908081754.13861.pedro@codesourcery.com> (Pedro Alves's message of "Sat\, 8 Aug 2009 17\:54\:13 +0100")

>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Sorry for the delay on this.

Pedro> One issue is that "set language" without an argument doesn't show that
Pedro> larger help list of known languages, because the enum command machinary
Pedro> takes care of handling the case of no argument itself.  I've moved that
Pedro> listing to "help set language", which I think is a better place for it
Pedro> anyway.  

Yeah.

If you put this in you might as well revert my cli-decode.c changes.

Pedro> 	(add_language): Install or reinstall the "set language" command
Pedro> 	here, and make it an enum command.  Build the enumeration and the
Pedro> 	help string from the current list of known languages.

This is also ugly, IMO, though differently so.  Re-registering the
command means a lot of allocation for something that we could fully know
at build time.

I suppose it would be possible to count the languages and only call
add_setshow_enum_cmd on the last call to add_language.

If we are to compare ugliness (in what units?  I suggest negative
helens), though, I would say that yours is the less ugly.

Pedro> Register the "auto" "local" and "unknown" languages in that
Pedro> order.

I was curious to know the rationale for this particular change.  If
order matters, this does not seem correct, because nothing guarantees
that _initialize_language will be called before any other call to
add_language.  Instead the sorting would have to be done in
add_language.  If order does not matter, then there's no need for the
change.

Tom


  reply	other threads:[~2009-08-12 22:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07 20:48 Tom Tromey
2009-08-07 22:05 ` Tom Tromey
2009-08-07 22:16 ` Pedro Alves
2009-08-07 22:29   ` Tom Tromey
2009-08-08  1:55     ` Tom Tromey
2009-08-08 16:17       ` Pedro Alves
2009-08-08 16:39         ` Pedro Alves
2009-08-08 18:08           ` Pedro Alves
2009-08-12 23:00             ` Tom Tromey [this message]
2009-08-13 17:06               ` Pedro Alves
2009-08-13 17:34                 ` Eli Zaretskii
2009-08-13 18:30                   ` Pedro Alves
2009-08-08  8:37 ` Eli Zaretskii
2009-08-10 17:59   ` Tom Tromey
2009-08-10 19:38     ` Eli Zaretskii
2009-08-10 19:59       ` Tom Tromey
2009-08-10 20:10         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ab24psp6.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox