From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6511 invoked by alias); 10 Oct 2006 14:52:19 -0000 Received: (qmail 6502 invoked by uid 22791); 10 Oct 2006 14:52:19 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 10 Oct 2006 14:52:17 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GXIxp-0005Tb-VK for gdb-patches@sourceware.org; Tue, 10 Oct 2006 10:52:14 -0400 Date: Tue, 10 Oct 2006 14:52:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: [rfc] Clarify shared library warning Message-ID: <20061010145213.GA20993@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes 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-10/txt/msg00092.txt.bz2 This function, added recently by Alex, just saved me hours. I was looking back at an old bug report, and some inexplicable symbols that seemed to start in the middle of functions. And right there was a message from GDB, not present last time I looked at the testcase: warning: .dynamic section for "/lib/libc.so.6" is not at the expected address The tarball that went with the core dump had the wrong libraries in it. No wonder it didn't work. But this warning isn't very self-explanatory. I was thinking something like the below, in addition. How does this sound? warning: .dynamic section for "/lib/libc.so.6" is not at the expected address warning: the wrong version of the shared library may have been found -- Daniel Jacobowitz CodeSourcery 2006-10-10 Daniel Jacobowitz * solib-svr4.c (LM_ADDR_CHECK): Suggest shared library mismatch. Index: solib-svr4.c =================================================================== RCS file: /cvs/src/src/gdb/solib-svr4.c,v retrieving revision 1.58 diff -u -p -r1.58 solib-svr4.c --- solib-svr4.c 18 May 2006 20:38:56 -0000 1.58 +++ solib-svr4.c 10 Oct 2006 14:47:59 -0000 @@ -221,6 +221,11 @@ LM_ADDR_CHECK (struct so_list *so, bfd * warning (_("difference appears to be caused by prelink, " "adjusting expectations")); } + else + { + warning (_("the wrong version of the shared library may " + "have been found")); + } } set_addr: