aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2019-10-24 15:43:21 -0700
committerH.J. Lu <hjl.tools@gmail.com>2019-10-24 15:43:21 -0700
commit7b71fc971bd31b27cce8b883007ad467a7567499 (patch)
treebd628e98eaeb29324dba80a541268d1928d28271 /gdb
parentcbb5a2ea493d0cbe49defc3d45ebe3b7e2728a51 (diff)
downloadgdb-7b71fc971bd31b27cce8b883007ad467a7567499.zip
gdb-7b71fc971bd31b27cce8b883007ad467a7567499.tar.gz
gdb-7b71fc971bd31b27cce8b883007ad467a7567499.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/symfile.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 664000a..8447542 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2019-10-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gdb/25126
+ * symfile.c (reread_symbols): Call forget_cached_source_info to
+ clear the stale source cache.
+
2019-10-24 Christian Biesinger <cbiesinger@google.com>
* configure: Regenerate.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index f74c6de..d2ed1cc 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);