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: Mon, 17 Dec 2007 10:42:13 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> 
> I would like to introduce a new structure called "struct parse_context"
> which, for now, would contain the language and radix to use when doing
> some parsing. This is something that we already discussed in a more
> general way.

Thanks!

> This patch introduces:
> 
>   - struct parse_context
> 
>   - A function called "build_parse_context" that builds a parse_context
>     structure from a language and radix. Eventually, when the struct
>     grows, we will add more parameters to that function.
> 
>   - A macro: current_parse_context which returns a parse context using
>     the current_language and the input_radix.  This is the context that
>     we should be using when parsing from a function that is a "command"
>     (that is a function that implements a command)
> 
>   - A macro: wrong_parse_context, which is an alias to current_parse_context.
>     This macro is useful to help breaking this task into incremental changes
>     and is temporary, as the FIXME explains. I am using this macro when
>     I am in a context where I don't have the parse_context to be used (yet),
>     to make sure that I don't forget to fix it later. Will be removed
>     when the task is complete.

How about if we try to document in gdbint.texinfo each new
infrastructure we introduce, from now on?  Would other maintainers
support such a requirement from contributors?  I can offer
text-to-Texinfo conversion services (and, of course, general help in
writing documentation), if someone does not feel up to speed with
Texinfo.

WDYT?


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