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] Fix a crash when displaying variables from shared library.


>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> Unfortunately, this code still crashes, because no_shared_libraries
Paul> first calls objfile_purge_solibs (which indirectly does
Paul> obstack_free), and only then clear_solib, which notifies me that
Paul> the library has already disappeared. When I proceed to use symbol,
Paul> I am already using dangling obstack :-(

Paul> Is it ok to move observer notification to before
Paul> objfile_purge_solibs, or should I add a new notification?

IMO it is ok to move this notification if you audit the existing users
to make sure they don't break.

However, it seems to me that you could also do this another way, by
noting at parse time which objfiles are referenced by a given display,
and then arranging to require a re-parse when an objfile is destroyed.
I think the existing objfile_data machinery could be used for this.

Tom


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