aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2015-01-31 12:43:02 -0800
committerDoug Evans <xdje42@gmail.com>2015-01-31 12:43:02 -0800
commite700d1b279b26d4b7d86cfae70d2e022ee748068 (patch)
tree57cc9807c2838f853c55684d916d452ea06075d8 /gdb/symfile.c
parent9f0500621b6a4908986394eb0fac151ef097f520 (diff)
downloadgdb-e700d1b279b26d4b7d86cfae70d2e022ee748068.zip
gdb-e700d1b279b26d4b7d86cfae70d2e022ee748068.tar.gz
gdb-e700d1b279b26d4b7d86cfae70d2e022ee748068.tar.bz2
PR symtab/17855
gdb/ChangeLog: PR symtab/17855 * symfile.c (clear_symtab_users): Move call to breakpoint_re_set to end.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 86a758a..96c7951 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3028,8 +3028,6 @@ clear_symtab_users (int add_flags)
clear_current_source_symtab_and_line ();
clear_displays ();
- if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0)
- breakpoint_re_set ();
clear_last_displayed_sal ();
clear_pc_function_cache ();
observer_notify_new_objfile (NULL);
@@ -3043,6 +3041,10 @@ clear_symtab_users (int add_flags)
/* Varobj may refer to old symbols, perform a cleanup. */
varobj_invalidate ();
+ /* Now that the various caches have been cleared, we can re_set
+ our breakpoints without risking it using stale data. */
+ if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0)
+ breakpoint_re_set ();
}
static void