This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 1/8] Types GC [unloading observer]
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 09 Jun 2009 13:59:09 -0600
- Subject: Re: [patch 1/8] Types GC [unloading observer]
- References: <20090525080108.GA13323@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> +@deftypefun void objfile_unloaded (void)
Jan> +Removal of @var{objfile} started by @code{objfile_unloading} has finished and
Jan> +@var{objfile} is no longer known to @value{GDBN}.
Jan> +@end deftypefun
It is strange that this refers to objfile without passing it.
I understand that this would be strange, since objfile's contents are
no longer valid.
Jan> @@ -926,6 +926,9 @@ new_symfile_objfile (struct objfile *objfile, int mainline, int verbo)
Jan> /* We're done reading the symbol file; finish off complaints. */
Jan> clear_complaints (&symfile_complaints, 0, verbo);
Jan> +
Jan> + /* We have finished unloading of OBJFILE. */
Jan> + observer_notify_objfile_unloaded ();
I don't understand the placement of this call, or of the other calls
to this function. Why not just put it near the end of free_objfile?
Alternatively, perhaps this observer should be renamed.
Also given this placement, I wonder whether this will suffer from the
same problem that Paul is running into -- bad performance when many
.so files are discovered at once.
Tom