Re: [RFC/RFA] add struct parse_context to all command functions

Ulrich Weigand
2008-10-21T18:05:39Z

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