diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-08-08 17:39:10 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-08-08 17:39:10 +0000 |
commit | 9bdcbae7fe5d41beb308223fd65123fb700e2e1d (patch) | |
tree | e0adcc2a7e253923b77bb2b81e4fa0b1d3f8540a /gdb | |
parent | f725025bcba912bb1cc099662f106f7dd870bdde (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/Makefile.in | 6 | ||||
-rw-r--r-- | gdb/objfiles.c | 9 | ||||
-rw-r--r-- | gdb/symfile.c | 7 |
4 files changed, 28 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5b829c2..239b96c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2006-08-08 Daniel Jacobowitz <dan@codesourcery.com> + + * 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. + 2006-08-08 Thiemo Seufer <ths@mips.com> * breakpoint.c (update_breakpoints_after_exec): Fix type mismatch. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index f114df8..25713ef 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2402,7 +2402,8 @@ objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(mdebugread_h) \ $(gdb_assert_h) $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) \ - $(hashtab_h) $(breakpoint_h) $(block_h) $(dictionary_h) $(source_h) + $(hashtab_h) $(breakpoint_h) $(block_h) $(dictionary_h) $(source_h) \ + $(parser_defs_h) $(expression_h) observer.o: observer.c $(defs_h) $(observer_h) $(command_h) $(gdbcmd_h) \ $(observer_inc) obsd-tdep.o: obsd-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(obsd_tdep_h) @@ -2722,7 +2723,8 @@ symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \ $(complaints_h) $(demangle_h) $(inferior_h) $(filenames_h) \ $(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \ $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \ - $(gdb_string_h) $(gdb_stat_h) $(observer_h) $(exec_h) + $(gdb_string_h) $(gdb_stat_h) $(observer_h) $(exec_h) \ + $(parser_defs_h) symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \ $(objfiles_h) $(exceptions_h) $(gdbcmd_h) $(target_h) $(value_h) \ $(symfile_h) $(observer_h) $(auxv_h) $(elf_common_h) diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 3419c6d..a3af5a4 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -34,6 +34,9 @@ #include "target.h" #include "bcache.h" #include "mdebugread.h" +#include "expression.h" +#include "parser-defs.h" + #include "gdb_assert.h" #include <sys/types.h> #include "gdb_stat.h" @@ -441,6 +444,12 @@ free_objfile (struct objfile *objfile) for example), so we need to call this here. */ clear_pc_function_cache (); + /* 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; + /* Check to see if the current_source_symtab belongs to this objfile, and if so, call clear_current_source_symtab_and_line. */ 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 |