This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 1/8] Types GC [unloading observer]

>>>>> "Jan" == Jan Kratochvil <> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]