Re: [PATCH] Have partial symbol tables own psymbol vectors

Tom Tromey
2020-10-17T22:33:19Z

Simon> I think it would be a good time to get rid of the objfile
Simon> parameter in the add_psymbol methods. This parameter shouldn't
Simon> be there if the partial symtabs are really objfile-independent.

I looked at this again today. It's pretty easy to get rid of most of
the uses of the objfile, but the last one is a bit of a pain:

psymbol.ginfo.compute_and_set_names (name, copy_name, objfile->per_bfd);

I suppose we could pass in the per-BFD object. And maybe I will do this
... not sure. It just feels a bit weird since it means we'd have to
pass in two "context" objects where really just one would do.

I suppose the deeper problem here is that while psymbols are
objfile-independent, we don't genuinely implement sharing anywhere
except DWARF -- that's the only reader where we did the work of making
sure any auxiliary data is also shareable.

Tom