From: Jim Blandy <jimb@red-bean.com>
To: fnf@specifix.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Clear current source symtab if belongs to objfile being freed
Date: Tue, 03 Jan 2006 23:26:00 -0000 [thread overview]
Message-ID: <8f2776cb0601031526y38a2cfbvc1174677ace27a27@mail.gmail.com> (raw)
In-Reply-To: <200601031242.38425.fnf@specifix.com>
On 1/3/06, Fred Fish <fnf@specifix.com> wrote:
> I stumbled over this problem while chasing something else. If the
> current source symtab belongs to a loaded shared library, and the
> objfile for that library is freed in the process or rerunning the
> executable, the current source symtab can be left pointing to garbage.
>
> An alternative solution, though a little more heavy handed, would be
> to replace the previous clear_pc_function_cache() call with a call to
> clear_symtab_users().
>
> Comments?
! /* I *think* all our callers call clear_symtab_users. If so, no
! need to call this here. Update: We are called via
! objfile_purge_solibs which doesn't call clear_symtab_users. */
I don't think we need our comments to be so archeological. If we
apply this patch, we should just change it to something direct like:
/* Not all our callers call clear_symtab_users
(objfile_purge_solibs, for example),
so we need to call this here. */
It seems to me, though, that the 'nosharedlibrary' and 'set
solib-absolute-prefix' commands actually ought to be calling
clear_symtab_users, no? I mean, types and blocks used by displays and
all those things are going to become invalidated, aren't they?
next prev parent reply other threads:[~2006-01-03 23:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-03 17:42 Fred Fish
2006-01-03 23:26 ` Jim Blandy [this message]
2006-01-04 20:57 ` Fred Fish
2006-01-05 22:08 ` Jim Blandy
2006-01-06 16:26 ` [commit] " Fred Fish
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=8f2776cb0601031526y38a2cfbvc1174677ace27a27@mail.gmail.com \
--to=jimb@red-bean.com \
--cc=fnf@specifix.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