Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kris Warkentin <kewarken@qnx.com>
To: Ben Hutchings <ben.hutchings@businesswebsoftware.com>
Cc: gdb@sources.redhat.com
Subject: Re: Loading shared libraries for core file
Date: Tue, 01 Feb 2005 16:02:00 -0000	[thread overview]
Message-ID: <41FFA906.40906@qnx.com> (raw)
In-Reply-To: <41FFA704.1030000@businesswebsoftware.com>

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!
>
><snip>
>  
>
>>What do you get when you 'objdump -x <your_app> | 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
>>    
>>
>
>  
>
>><your_app>" 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


  reply	other threads:[~2005-02-01 16:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <41FF84B0.2060008@businesswebsoftware.com>
     [not found] ` <41FF9CB8.8070507@qnx.com>
2005-02-01 15:53   ` Ben Hutchings
2005-02-01 16:02     ` Kris Warkentin [this message]
2005-02-01 14:57 Ben Hutchings
2005-02-01 15:12 ` Kris Warkentin
  -- strict thread matches above, loose matches on Subject: below --
2005-01-31 19:14 Ben Hutchings
2005-01-31 20:14 ` Kris Warkentin

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=41FFA906.40906@qnx.com \
    --to=kewarken@qnx.com \
    --cc=ben.hutchings@businesswebsoftware.com \
    --cc=gdb@sources.redhat.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