From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21638 invoked by alias); 21 Apr 2010 15:18:15 -0000 Received: (qmail 21628 invoked by uid 22791); 21 Apr 2010 15:18:14 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Apr 2010 15:18:07 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C4AB52BACEE for ; Wed, 21 Apr 2010 11:18:05 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cM9EF6q7h-7W for ; Wed, 21 Apr 2010 11:18:05 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 9C4A42BACE3 for ; Wed, 21 Apr 2010 11:18:05 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4254DF5895; Wed, 21 Apr 2010 08:18:05 -0700 (PDT) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA/commit] Check library name rather than member name when rereading symbols. Date: Wed, 21 Apr 2010 15:18:00 -0000 Message-Id: <1271863083-15509-1-git-send-email-brobecker@adacore.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00681.txt.bz2 Hello, On Darwin, we have lots of complaints being emitted when restarting a program: (gdb) start `a-except.o' has disappeared; keeping its symbols. `unwind-dw2.o' has disappeared; keeping its symbols. `s-except.o' has disappeared; keeping its symbols. `s-traceb.o' has disappeared; keeping its symbols. These object files are part of the GNAT runtime, and were never available. The warning comes from the fact that we're checking whether the .o files in the GNAT shared runtime have changed whereas we should be checking whether the GNAT shared library itself has changed. This patch implements this. Although it is really only useful on a platform such as Darwin (debug info stored in .o files), we believe that this is the right thing to do in general. This change should be a noop for all the other platforms in any case. gdb/ChangeLog (from Tristan Gingold): * symfile.c (reread_symbols): Also search for file in libraries. Tested on x86_64-darwin and x86_64-linux. Any thoughts on this? --- gdb/symfile.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/gdb/symfile.c b/gdb/symfile.c index eda26cc..2124419 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2291,14 +2291,12 @@ reread_symbols (void) if (objfile->separate_debug_objfile_backlink) continue; -#ifdef DEPRECATED_IBM6000_TARGET /* If this object is from a shared library, then you should stat on the library name, not member name. */ if (objfile->obfd->my_archive) res = stat (objfile->obfd->my_archive->filename, &new_statbuf); else -#endif res = stat (objfile->name, &new_statbuf); if (res != 0) { -- 1.6.3.3