From: Doug Evans <xdje42@gmail.com>
To: gdb-patches@sourceware.org, brobecker@adacore.com
Subject: [PATCH][PR symtab/17855] Fix.
Date: Tue, 20 Jan 2015 06:27:00 -0000 [thread overview]
Message-ID: <m33876ary6.fsf@sspiff.org> (raw)
Hi.
This patch fixes symtab/17855.
Basically the issue is that breakpoint_re_set is currently being called
before observer_notify_new_objfile (NULL), and thus the ada symbol
cache (and the general symbol cache of a separate patch) aren't being
flushed first, so that when breakpoints are reset symbol lookup is being
done on a stale cache.
Regression tested on amd64-linux.
2015-01-19 Doug Evans <xdje42@gmail.com>
PR symtab/17855
* symfile.c (clear_symtab_users): Notify observers of change before
calling breakpoint_re_set.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index d55e361..ad481de 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3023,6 +3023,12 @@ clear_symtab_users (int add_flags)
/* Someday, we should do better than this, by only blowing away
the things that really need to be blown. */
+ /* Notify anyone listening that the previous loaded symtab(s) are invalid.
+ It is important to do this before calling breakpoint_re_set as the latter
+ will try to look up symbols, and for example the symbol cache needs to
+ be flushed first. */
+ observer_notify_new_objfile (NULL);
+
/* 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 ();
@@ -3032,7 +3038,6 @@ clear_symtab_users (int add_flags)
breakpoint_re_set ();
clear_last_displayed_sal ();
clear_pc_function_cache ();
- observer_notify_new_objfile (NULL);
/* Clear globals which might have pointed into a removed objfile.
FIXME: It's not clear which of these are supposed to persist
next reply other threads:[~2015-01-20 6:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 6:27 Doug Evans [this message]
2015-01-22 11:42 ` Pedro Alves
2015-01-22 15:37 ` Doug Evans
2015-01-29 8:00 ` Doug Evans
2015-01-29 8:12 ` Joel Brobecker
2015-01-29 10:01 ` Doug Evans
[not found] ` <m3r3ualkvb.fsf@sspiff.org>
2015-02-03 17:02 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m33876ary6.fsf@sspiff.org \
--to=xdje42@gmail.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).