This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/RFA] add struct parse_context to all command functions
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: brobecker at adacore dot com (Joel Brobecker)
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 21 Oct 2008 20:04:17 +0200 (CEST)
- Subject: Re: [RFC/RFA] add struct parse_context to all command functions
Joel Brobecker wrote:
> I'd like to start working on adding a struct parse_context again.
> The ultimate goal is to pass this structure as an argument to all
> the "parse..." routines, rather than rely on the current_language
> and input_radix globals. In addition to being cleaner, it will also
> help fix a bug where the current_language is switched under us while
> trying to do parse an expression.
Now that current_gdbarch is already pulled out of the parse routines,
it would make sense to also add a gdbarch parameter to the parse_context
structure; this would be used to set up expout->gdbarch in
parse_exp_in_context.
Otherwise, I like the proposal :-)
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com