This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Replace deprecated_target_new_objfile_hook by observer
On Tue, May 08, 2007 at 12:30:24AM +0200, Ulrich Weigand wrote:
> Hmm, it was quite useful when implementing SPU overlay support
> (see the patch set I just sent out). I'm using it to attach
> a target-specific overlay table data structure to each objfile
> as it is read in.
>
> There didn't seem to be any other callback that was just right
> for this (e.g. executable_changed is called already before the
> symfile_objfile is instantiated) ...
>
> Any suggestions how to solve this differently?
Well, looking at your SPU patches, that seems like a good use of this
observer. So it's fine with me.
All the other places you've converted are less clear; if you fixed
exactly when the two existing observers get called they'd probably
cover everything else. But per-objfile data wants a direct
correlation with objfile creation.
--
Daniel Jacobowitz
CodeSourcery