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
On Mon, Oct 20, 2008 at 05:02:14PM -0200, Thiago Jung Bauermann wrote:
> El lun, 20-10-2008 a las 09:16 -0700, Joel Brobecker escribió:
> > Har har har, I should be able to be active again soon :-)
>
> Hooray. :-)
>
> > So we have 3 alternatives:
> >
> > 1. All command functions receive the parse_context structure.
> > Do the transition all at once.
Personally, I prefer this one, unless the person doing the work
(that's you!) doesn't agree.
> THe problem with (3) is that you make the code slightly more complex by
> adding an additional add_*_cmd that the GDB hacker will have to learn
> about.
I also worry that there will end up being a combinatorial explosion of
these things.
> The advantage is that you can avoid writing functions with argument
> they'll never use. I mention this because the ProjectIdeas wiki page
> mentions that it's desirable to have GDB compile with -Wunused.
>
> IMHO I prefer to use (3) and have the option of using the -Wunused later
> (not that I'm stepping up to the task! :-) ).
Let's not use this as a design decision. IMO it is not too ugly to
mark unused arguments with e.g. ATTRIBUTE_UNUSED; that's what GCC
does.
--
Daniel Jacobowitz
CodeSourcery