aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2005-03-08 21:40:46 +0000
committerDaniel Jacobowitz <drow@false.org>2005-03-08 21:40:46 +0000
commitc0501be5509727c0361a0bf501f7dc4e799cb03c (patch)
tree052ccb8c9316e0b90a302d9dcf1cbf496b763251 /gdb
parent399132afa6e28b8cdd81b0f92aec9f723069029d (diff)
downloadgdb-c0501be5509727c0361a0bf501f7dc4e799cb03c.zip
gdb-c0501be5509727c0361a0bf501f7dc4e799cb03c.tar.gz
gdb-c0501be5509727c0361a0bf501f7dc4e799cb03c.tar.bz2
* symfile.c (clear_symtab_users): Call
clear_current_source_symtab_and_line first.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/symfile.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 70e4478..ccb361f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * symfile.c (clear_symtab_users): Call
+ clear_current_source_symtab_and_line first.
+
2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
* ax-gdb.c (gen_expr): Add UNOP_PLUS case.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 1dbc2b2..89878bc 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);