From: H.J. Lu Date: Thu, 24 Oct 2019 22:43:21 +0000 (-0700) Subject: Call forget_cached_source_info to clear the stale source cache X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b71fc971bd31b27cce8b883007ad467a7567499;p=binutils-gdb.git Call forget_cached_source_info to clear the stale source cache Clear the stale source cache when re-reading symbols. PR gdb/25126 * symfile.c (reread_symbols): Call forget_cached_source_info to clear the stale source cache. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 664000add4d..8447542d8ed 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-10-24 H.J. Lu + + PR gdb/25126 + * symfile.c (reread_symbols): Call forget_cached_source_info to + clear the stale source cache. + 2019-10-24 Christian Biesinger * configure: Regenerate. diff --git a/gdb/symfile.c b/gdb/symfile.c index f74c6de5962..d2ed1ccacdf 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2518,6 +2518,9 @@ reread_symbols (void) automatically recreated by sym_read. */ free_objfile_separate_debug (objfile); + /* Clear the stale source cache. */ + forget_cached_source_info (); + /* Remove any references to this objfile in the global value lists. */ preserve_values (objfile);