diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/progspace.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2d880ae..1e2aa8d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-08-12 Pedro Alves <palves@redhat.com> + + PR gdb/26336 + * progspace.c (program_space::remove_objfile): Invalidate the + frame cache. + 2020-08-11 Tom de Vries <tdevries@suse.de> * MAINTAINERS: Mark ms1 as deleted. diff --git a/gdb/progspace.c b/gdb/progspace.c index a0b14a6..462083c 100644 --- a/gdb/progspace.c +++ b/gdb/progspace.c @@ -198,6 +198,12 @@ program_space::add_objfile (std::shared_ptr<objfile> &&objfile, void program_space::remove_objfile (struct objfile *objfile) { + /* Removing an objfile from the objfile list invalidates any frame + that was built using frame info found in the objfile. Reinit the + frame cache to get rid of any frame that might otherwise + reference stale info. */ + reinit_frame_cache (); + auto iter = std::find_if (objfiles_list.begin (), objfiles_list.end (), [=] (const std::shared_ptr<::objfile> &objf) { |