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: [RFC/RFA] Introduce new struct parse_context


> Date: Tue, 25 Dec 2007 22:00:22 -0800
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
> 
> > > How about the following compromise: I describe again roughly what the
> > > problem is and how I am going to address it. Then you can decide what
> > > to add to gdbint, and where.
> > 
> > Okay, let's try that.
> 
> Great! Here is the problem - It shows up more often on mips-irix.

Thanks for the detailed description.

To document this, I'd go like this:

  Once upon a time, @value{GDBN} used a global variable called
  @code{current_language} to store the current source language.  But
  this didn't always work, because @code{current_language} would
  sometimes get unexpectedly switched under our feet as a side-effect
  of calling functions such as @code{select_frame}.  To resolve this
  difficulty, @value{GDBN} now passes the language as a parameter to
  routines that parse language-specific expressions.

I would then describe the structure that will hold the language and
the input radix, give a few examples of such routines, and explain
when they are used by GDB.  If there's some infrastructure involved
here, beyond the above-mentioned structure, it should be documented as
well.

As to where to document this, I think the node "Language Support" is
the right place.  It already mentions `current_language', so it should
be updated anyway if we are getting rid of that variable.


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