Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Lee <backrev@yahoo.com>
To: gdb@sourceware.org
Subject: debugging release shared libraries
Date: Thu, 17 Aug 2006 03:10:00 -0000	[thread overview]
Message-ID: <20060817031041.1118.qmail@web55609.mail.re4.yahoo.com> (raw)

I have one problem that I have not found a good
solution for with gdb.
I realize that gdb is only half of the solution for a
core, I wasn't sure which group to start with.    I
use several platforms, but for now lets assume shared
libs are elf-i386, using linux.

On other platforms when a core file is generated it
contains all of the basic symbols that a person needs
to see why things blew up, examine the stack, threads
whatever.  If symbols are needed you can match them to
a sym file or pdb file and they can even be auto
magically matched up with the binary in question in
the dump. checksum and such.

On linux I am working with applications that use
numerous shared libraries.  Symbols are more than
frustrating to me.   A short example

you run 
./foo
foo then loads 
libc.so.
libdl.so
libnsl.so      
ld-linux.so.
libfred.so

libfred.so then loads
libc.so
libren.so
libstimpy.so
and so on.

This can go on for like 50 shared libraries.

Now the problem part
We dump core

someone emails me the core to debug.
the libraries of course are not debug nor is the
application

if you have the luxury of debugging the core on the
remote machine wherever that might be then all is well
as gdb will load whatever symbols it needs from the
prog and the so files.

if you are lucky enough to know the exact versions of
all 50+ shared libs the machine is running then you
can create a chroot jail and run it in gdb on my
machine

You can of course always have symbols if you care to
compile every shared library and the prog with -g and
then distribute the huge libraries.  

I have also looked into compiling with -g, then
stripping the files creating debug files and using
add-gnu-debuglink.   Even this has issues as I still
have to have all of the exact same versions as is on
the machine in question so that those shared libraries
can tell me the correct version of debug file to load.

It just seems that there is just no way to get around
having all of the binaries to debug a core, or compile
everything with -g and always running the larger
libraries.

Any ideas would greatly be appreciated.





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


             reply	other threads:[~2006-08-17  3:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-17  3:10 Lee [this message]
2006-08-17 12:32 ` Daniel Jacobowitz

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=20060817031041.1118.qmail@web55609.mail.re4.yahoo.com \
    --to=backrev@yahoo.com \
    --cc=gdb@sourceware.org \
    /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