public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Call forget_cached_source_info to clear the stale source cache
@ 2019-10-24 22:46 H.J.Lu
0 siblings, 0 replies; only message in thread
From: H.J.Lu @ 2019-10-24 22:46 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7b71fc971bd31b27cce8b883007ad467a7567499
commit 7b71fc971bd31b27cce8b883007ad467a7567499
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Oct 24 15:43:21 2019 -0700
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:
---
gdb/ChangeLog | 6 ++++++
gdb/symfile.c | 3 +++
2 files changed, 9 insertions(+)
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-24 22:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24 22:46 [binutils-gdb] Call forget_cached_source_info to clear the stale source cache H.J.Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).