This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH/RFC] Per-architecture DWARF CFI register state initialization hooks
On Sun, Feb 15, 2004 at 11:04:26AM -0500, Andrew Cagney wrote:
> > Or do you want the architecture to allocate
> >and initialize the structure? The latter would mean more work for the
> >architecture; if you want to override a single member of the structure
> >you'd have to fill in all the details. I don't really like that.
> >
> > From: Daniel Jacobowitz <drow@mvista.com>
> > Date: Sat, 7 Feb 2004 18:03:30 -0500
> >
> > Hmm, I do. You're adding a per-architecture data item which is a
> > function pointer, and what amounts to the rest of what gdbarch.sh would
> > generate (wrapper functions, default initialization. I'd rather you
> > just used gdbarch.sh.
> >
> >
> >What about Daniels objections that I'm hand-coding much what
> >gdbarch.sh already does? I'm feeling that the modularity is worth it,
> >but how do you feel about that?
>
> No. Yes. Using gdbarch, and loosing that modularity, is far too high a
> price to pay.
Since I am obviously not getting it, could someone explain to me what
the modularity advantage is?
All I see is a function pointer, with a default value or overridden by
the architecture initialization, used to parametrize a module's
behavior. That is the same niche as every existing member of the
gdbarch vector.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer