This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Plug memory leaks during gdbarch initialization
On Tue, Jan 23, 2007 at 07:25:01AM -0800, Jim Blandy wrote:
>
> Daniel Jacobowitz <drow@false.org> writes:
> > The patch is an improvement, but doesn't fix that wart. I don't really
> > want to check it in without fixing the underlying problem but I don't
> > see a good way... anyone have a suggestion?
>
> I could imagine having each file's _initialize function start with:
Now that they're in deprecated_register_gdbarch_swap, this isn't enough
- we no longer rely on _initialize_foo's order directly, but indirectly
through the order of initializer functions in the swap list.
Hmm, but your change would still fix it, with judicious addition of
comments that order matters for swaps...
--
Daniel Jacobowitz
CodeSourcery