diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2019-10-24 15:43:21 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2019-10-24 15:43:21 -0700 |
commit | 7b71fc971bd31b27cce8b883007ad467a7567499 (patch) | |
tree | bd628e98eaeb29324dba80a541268d1928d28271 /gdb/symfile.c | |
parent | cbb5a2ea493d0cbe49defc3d45ebe3b7e2728a51 (diff) | |
download | gdb-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/symfile.c')
-rw-r--r-- | gdb/symfile.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |