From: Joel Brobecker Date: Sat, 31 Jan 2015 21:04:51 +0000 (-0800) Subject: PR symtab/17855 X-Git-Tag: gdb-7.9.0-release~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4137b858a8b7916668f160a166ee375adcb601b;p=thirdparty%2Fbinutils-gdb.git PR symtab/17855 gdb/ChangeLog: PR symtab/17855 * symfile.c (clear_symtab_users): Move call to breakpoint_re_set to end. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0e2a31c23d5..e14489be24c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2015-01-31 Joel Brobecker + + PR symtab/17855 + * symfile.c (clear_symtab_users): Move call to breakpoint_re_set + to end. + 2015-01-31 Eli Zaretskii * tui/tui-io.c (tui_expand_tabs): New function. diff --git a/gdb/symfile.c b/gdb/symfile.c index d55e36186c0..04a5c58630a 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