From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1336 invoked by alias); 1 Feb 2005 16:02:47 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1142 invoked from network); 1 Feb 2005 16:02:29 -0000 Received: from unknown (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org with SMTP; 1 Feb 2005 16:02:29 -0000 Received: from [10.12.1.181] (dhcpa181.ott.qnx.com [10.12.1.181]) by nimbus.ott.qnx.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id DL3QNJLN; Tue, 1 Feb 2005 11:02:30 -0500 Message-ID: <41FFA906.40906@qnx.com> Date: Tue, 01 Feb 2005 16:02:00 -0000 From: Kris Warkentin User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) MIME-Version: 1.0 To: Ben Hutchings CC: gdb@sources.redhat.com Subject: Re: Loading shared libraries for core file References: <41FFA704.1030000@businesswebsoftware.com> In-Reply-To: <41FFA704.1030000@businesswebsoftware.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-02/txt/msg00010.txt.bz2 Ben Hutchings wrote: >Kris Warkentin wrote: > > >>Ben Hutchings wrote: >> >> >>>Kris Warkentin wrote: >>> >>> >>>>'info shared' should tell you what it plans to load and whether or >>>> >>>> >not > > >>>>it has yet. >>>> >>>> >>>Unfortunately not: >>>"No shared libraries loaded at this time." >>> >>> >>> >>Strange. Is it possible that your application cored before it loaded >>the shared libs? Linux uses lazy linking so if none of your objects >> >> >had > > >>been used yet, they might not be loaded. >> >> > >The process had been running for a while and to get to that point it >would have had to run code from all the libraries. It was actually >running code from a shared library at the point I made the core dump. >Now gdb won't show me that code! > > > > >>What do you get when you 'objdump -x | grep NEEDED'? >> >> > > NEEDED libboost_thread.so > NEEDED libdl.so.2 > NEEDED libstdc++.so.6 > NEEDED libm.so.6 > NEEDED libgcc_s.so.1 > NEEDED libpthread.so.0 > NEEDED libc.so.6 > NEEDED ld-linux.so.2 > > > >>Also, you might want to try "LD_DEBUG=all LD_DEBUG_OUTPUT=ld_debug.txt >> >> > > > >>" to see what's going on. >> >> > >It's fairly clear that all the libraries are loaded successfully. > What happens if you run the app in gdb? Can you see the shared libs then? Perhaps there is something wrong with the core file. If you look at usr/include/link.h, you'll see how this all works. The runtime linker fills in a list of r_debug structures containing all the solibs. This information should be in the core file. If you can see the solibs when you just run it in gdb but not in the core-file, perhaps something is going on there. cheers, Kris