From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28597 invoked by alias); 4 Jan 2006 20:57:38 -0000 Received: (qmail 28584 invoked by uid 22791); 4 Jan 2006 20:57:36 -0000 X-Spam-Check-By: sourceware.org Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO duck.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 04 Jan 2006 20:57:34 +0000 Received: from diveadx (duck.specifix.com [64.220.152.99]) by duck.specifix.com (Postfix) with ESMTP id 9CB53FC4D; Wed, 4 Jan 2006 12:57:32 -0800 (PST) From: Fred Fish Reply-To: fnf@specifix.com To: Jim Blandy Subject: Re: [PATCH] Clear current source symtab if belongs to objfile being freed Date: Wed, 04 Jan 2006 20:57:00 -0000 User-Agent: KMail/1.9.1 Cc: gdb-patches@sourceware.org, fnf@specifix.com References: <200601031242.38425.fnf@specifix.com> <8f2776cb0601031526y38a2cfbvc1174677ace27a27@mail.gmail.com> In-Reply-To: <8f2776cb0601031526y38a2cfbvc1174677ace27a27@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601041558.09798.fnf@specifix.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00049.txt.bz2 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