This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA][3/5] New port: Cell BE SPU (the port itself)
On Tue, Nov 21, 2006 at 09:22:15PM +0100, Ulrich Weigand wrote:
> Suggestions? The cleanest way I could think of would be to actually
> extend the to_attach, to_detach, to_create_inferior, and to_mourn_inferior
> callbacks with an explict struct target_ops * parameter.
Yes, that's the right way to do it.
> However, that change would have extensive effects throughout GDB; many
> of the changes are mechanical, but some appear non-trivial, like the
> way the various thread stratum targets call back to the "beneath" target
> using saved function pointers ...
Yes, that's the reason it hasn't been done yet :-) When you have the
real target_ops, you can find the target beneath it to invoke fairly
easily (there are examples of this in e.g. to_xfer_partial). Then some
of the ugly saved function pointers can be removed. As for the ones
which replace a member of a target_ops vector with another and then
save the old one, I'm not sure what to pass to those.
(I've not looked at your actual patch from this message.)
--
Daniel Jacobowitz
CodeSourcery