From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC/RFA] add struct parse_context to all command functions
Date: Thu, 09 Oct 2008 16:13:00 -0000 [thread overview]
Message-ID: <m3d4i9vjec.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20081009140424.GD5372@adacore.com> (Joel Brobecker's message of "Thu\, 9 Oct 2008 10\:04\:24 -0400")
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> I'd like to start working on adding a struct parse_context again.
Joel> The ultimate goal is to pass this structure as an argument to all
Joel> the "parse..." routines, rather than rely on the current_language
Joel> and input_radix globals. In addition to being cleaner, it will also
Joel> help fix a bug where the current_language is switched under us while
Joel> trying to do parse an expression.
I looked for the previous thread, and found this:
http://sourceware.org/ml/gdb-patches/2007-12/msg00255.html
... but I didn't see an explanation of the problem. Would you mind
repeating it?
Joel> The next step for this task is to add a struct parse_context parameter
Joel> to the "command" functions (the functions being called when the user
Joel> calls a function in the UI). When the user enters a command, we know
Joel> that we can use the current language and input radix to parse the
Joel> arguments.
I'm all in favor of this kind of cleanup.
struct cmd_list_element already has some support for multiple styles
of callback. It seems to me that you could limit your change to a
subset of all the commands by adding a new field to the 'function'
union. (That would mean more add_* functions, though.)
Joel> 1. The prototypes for the various add_* functions are duplicated.
Joel> There is a copy in command.h, and another in cli/cli-decode.h.
Joel> Is there a specific reason why we can't keep only one copy?
Joel> For instance, only keep the copy in cli/cli-decode.h?
[ and 2 and 3]
I have wondered about these myself.
Tom
next prev parent reply other threads:[~2008-10-09 16:13 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 14:05 Joel Brobecker
2008-10-09 16:13 ` Tom Tromey [this message]
2008-10-09 22:20 ` Joel Brobecker
2008-10-20 16:16 ` Joel Brobecker
2008-10-20 19:03 ` Thiago Jung Bauermann
2008-10-21 0:47 ` Daniel Jacobowitz
2008-10-21 18:06 ` Ulrich Weigand
2008-10-21 18:18 ` Daniel Jacobowitz
2008-10-22 1:40 ` Joel Brobecker
2008-10-22 20:15 ` Tom Tromey
2008-10-22 20:36 ` Joel Brobecker
2008-10-21 1:22 ` Tom Tromey
2008-10-21 7:07 ` Joel Brobecker
2008-10-21 18:12 ` Ulrich Weigand
2008-10-21 18:58 ` Tom Tromey
2008-10-21 19:33 ` Tom Tromey
2008-10-22 18:03 ` Ulrich Weigand
2008-10-22 18:54 ` Tom Tromey
2008-10-22 22:24 ` Ulrich Weigand
2008-10-23 1:02 ` Tom Tromey
2008-10-23 19:50 ` Ulrich Weigand
2008-10-23 21:29 ` Tom Tromey
2008-10-24 13:01 ` Ulrich Weigand
2008-10-25 16:05 ` Tom Tromey
2008-10-27 17:07 ` Tom Tromey
2008-10-28 16:27 ` Ulrich Weigand
2008-10-28 18:17 ` Tom Tromey
2008-10-28 20:00 ` Ulrich Weigand
2008-10-25 16:25 ` Joel Brobecker
2008-10-25 16:46 ` Tom Tromey
2008-10-26 15:19 ` Joel Brobecker
2008-10-21 18:05 ` Ulrich Weigand
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=m3d4i9vjec.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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