aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-08-08 17:39:10 +0000
committerDaniel Jacobowitz <drow@false.org>2006-08-08 17:39:10 +0000
commit9bdcbae7fe5d41beb308223fd65123fb700e2e1d (patch)
treee0adcc2a7e253923b77bb2b81e4fa0b1d3f8540a /gdb/symfile.c
parentf725025bcba912bb1cc099662f106f7dd870bdde (diff)
downloadgdb-9bdcbae7fe5d41beb308223fd65123fb700e2e1d.zip
gdb-9bdcbae7fe5d41beb308223fd65123fb700e2e1d.tar.gz
gdb-9bdcbae7fe5d41beb308223fd65123fb700e2e1d.tar.bz2
* Makefile.in (objfiles.o, symfile.o): Update.
* objfiles.c: Include "expression.h" and "parser-defs.h". (free_objfile): Clear global blocks. * symfile.c: Include "parser-defs.h". (clear_symtab_users): Clear global blocks.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 396be8f..9d89f83 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -51,6 +51,7 @@
#include "block.h"
#include "observer.h"
#include "exec.h"
+#include "parser-defs.h"
#include <sys/types.h>
#include <fcntl.h>
@@ -2518,6 +2519,12 @@ clear_symtab_users (void)
clear_pc_function_cache ();
if (deprecated_target_new_objfile_hook)
deprecated_target_new_objfile_hook (NULL);
+
+ /* Clear globals which might have pointed into a removed objfile.
+ FIXME: It's not clear which of these are supposed to persist
+ between expressions and which ought to be reset each time. */
+ expression_context_block = NULL;
+ innermost_block = NULL;
}
static void