Re: [patch] Replace reread_symbols by load+free calls

Tom Tromey
2009-08-14T22:34:49Z

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Sorry about the long delay on this. I try not to just drop threads I'm
involved in, but sometimes I get distracted.

Jan> IMO the whole `struct objfile' should replaced by a new one
Jan> (instead of its in-place patching). Which will probably have
Jan> other dependencies...

Tom> I'm interested to hear your idea and reasoning.

Jan> Sometimes there are differentiations between complete objects
Jan> destructors (objfile_free_data) and in-place object deletions
Jan> (clear_objfile_data); OK did not briefly found more such cases now.
Jan> Expecting it was there for some performance improvements which not
Jan> worth it nowadays.

I misunderstood something you were saying earlier in the thread -- I
thought you were talking about dropping 'struct objfile' itself in favor
of some new datastructure (as opposed to slowly refactoring it). But,
now I understand that you really meant that reread_symbols should be
rewritten.

I realize you pulled this patch from consideration. But, FWIW, I tend
to think it is a good idea, because it ensures that all the hooks and
observers will be run identically in both cases.

Tom