summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2005-03-08 21:40:46 +0000
committerDaniel Jacobowitz <dan@debian.org>2005-03-08 21:40:46 +0000
commit5a0a8dae44904449653218cb25ce32113789c367 (patch)
treecc2a8872c4e0e1845fb56685a1f5bde2d536b968 /gdb/symfile.c
parentad9b357cc2e6d06a33a3bc5e189f2f0bdb223767 (diff)
downloadgdb-5a0a8dae44904449653218cb25ce32113789c367.tar.gz
* symfile.c (clear_symtab_users): Call
clear_current_source_symtab_and_line first.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 1dbc2b25033..89878bcbcf7 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2367,12 +2367,16 @@ clear_symtab_users (void)
{
/* Someday, we should do better than this, by only blowing away
the things that really need to be blown. */
+
+ /* Clear the "current" symtab first, because it is no longer valid.
+ breakpoint_re_set may try to access the current symtab. */
+ clear_current_source_symtab_and_line ();
+
clear_value_history ();
clear_displays ();
clear_internalvars ();
breakpoint_re_set ();
set_default_breakpoint (0, 0, 0, 0);
- clear_current_source_symtab_and_line ();
clear_pc_function_cache ();
if (deprecated_target_new_objfile_hook)
deprecated_target_new_objfile_hook (NULL);