Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fred Fish <fnf@specifix.com>
To: Jim Blandy <jimb@red-bean.com>
Cc: gdb-patches@sourceware.org, fnf@specifix.com
Subject: Re: [PATCH] Clear current source symtab if belongs to objfile being freed
Date: Wed, 04 Jan 2006 20:57:00 -0000	[thread overview]
Message-ID: <200601041558.09798.fnf@specifix.com> (raw)
In-Reply-To: <8f2776cb0601031526y38a2cfbvc1174677ace27a27@mail.gmail.com>

On Tuesday 03 January 2006 18:26, Jim Blandy wrote:
> 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?

I tried the following patch but it broke a bunch of stuff in the testsuite.

*** objfiles.c  30 Dec 2005 18:53:15 -0000      1.1.1.2
--- objfiles.c  4 Jan 2006 19:11:32 -0000
*************** objfile_purge_solibs (void)
*** 689,694 ****
--- 689,695 ----
    struct objfile *objf;
    struct objfile *temp;

+   clear_symtab_users ();
    ALL_OBJFILES_SAFE (objf, temp)
    {
      /* We assume that the solib package has been purged already, or will

I've not investigated all the failures, but I suppose it's reasonable to
assume that this is overkill.  What if there is a lot of debugging state
set up, none of which references the discarded objfile, and we expect
it to still be set up after discarding the objfile?

The patch I submitted is pretty minimalist in what it affects, only
discarding a reference that gdb knows to be invalidated.  Perhaps there
will be others, but they should probably be dealt with as they are
discovered.

It might be a good idea though to put in some testsuite tests that
specifically check some of the other operations you suspect could 
also be affected.

-Fred



  reply	other threads:[~2006-01-04 20:57 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
2006-01-04 20:57   ` Fred Fish [this message]
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=200601041558.09798.fnf@specifix.com \
    --to=fnf@specifix.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jimb@red-bean.com \
    /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