This is the mail archive of the gdb-patches@sourceware.org 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] gdb: Reinitialize objfile::section_offsets during objfile reload


On 1/26/20 4:15 PM, Tom Tromey wrote:

> Andrew> One thing I did wonder about while looking at this fix is whether it
> Andrew> would be possible to combine at least parts of syms_from_objfile_1
> Andrew> with the core of reread_symbols.  I did have a go at doing this but
> Andrew> gave up in the end due to the subtle differences between the two.
> Andrew> Still, I think that with some more effort this might be possible, and
> Andrew> this could be a nice clean up.
> 
> A long time ago, Jan had a patch along these lines.
> I believe what his did was just throw away the logic in reread_symbols
> in favor of simply creating a new objfile.  I wonder if it's too late to
> do this now, since objfiles are exposed to Python.

IIRC, that patch walked all the places that store objfile pointers,
to recreate the objfiles.  IMO, an approach that avoids that would be
better.

> 
> Anyway, IMO, if there are subtle differences, they are probably bugs of
> some sort; and unifying these code paths seems like clearly the right
> thing to do.

Agreed.

Thanks,
Pedro Alves


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