From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Roy Smith <roy@panix.com>
Cc: gdb@sourceware.org
Subject: Re: identifying shared libraries in gdb?
Date: Mon, 19 Apr 2010 16:13:00 -0000 [thread overview]
Message-ID: <20100419161308.GA1430@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <c07bfc564f438e91c02801c107361356.squirrel@mail.panix.com>
On Wed, 14 Apr 2010 23:42:04 +0200, Roy Smith wrote:
> We've got a core file from a customer and suspect that the customer may
> not have the right set of shared libraries installed. On solaris dbx, we
> would use "proc -map" to see the elf checksums of each loaded library and
> run "elfdump -k" on the .so's that should be there and see if the
> checksums match. Is the a way to do the equivalent in gdb on linux?
I am aware only on build-id enabled systems (recent Fedoras, unaware of
others):
$ eu-unstrip -n -p `pidof sleep`
0x400000+0x206000 449e4ead03ed87773ded7ee2da232e663935f50f@0x40024c /bin/sleep /usr/lib/debug/bin/sleep.debug /bin/sleep
0x3d28400000+0x21f000 18c05f9f21450f2d5d8c61b2bfa06d55cdd0f67c@0x3d284001d8 /lib64/ld-2.11.1.so /usr/lib/debug/lib64/ld-2.11.1.so.debug /lib64/ld-2.11.1.so
0x3d28c00000+0x374000 0625835c70e0a883fc4889b45a8fcd66536ed29b@0x3d28c00280 /lib64/libc-2.11.1.so /usr/lib/debug/lib64/libc-2.11.1.so.debug /lib64/libc-2.11.1.so
0x3d29800000+0x218000 3ba0bd0cc7da6d2fa0cb7df46f74f2deefeb1911@0x3d29800248 /lib64/libpthread-2.11.1.so /usr/lib/debug/lib64/libpthread-2.11.1.so.debug /lib64/libpthread-2.11.1.so
0x3d2a000000+0x208000 f548dbf46ffc75059aee750297c6ab67c6b95d20@0x3d2a000248 /lib64/librt-2.11.1.so /usr/lib/debug/lib64/librt-2.11.1.so.debug /lib64/librt-2.11.1.so
0x7ffff5daf000+0x1000 - - - [vdso: 926]
It works the same for:
$ eu-unstrip -n --core=./core.1689
$ eu-readelf -n /bin/sleep | grep 'Build ID'
...
Note section [ 3] '.note.gnu.build-id' of 36 bytes at offset 0x23c:
Owner Data size Type
GNU 20 GNU_BUILD_ID
Build ID: 449e4ead03ed87773ded7ee2da232e663935f50f
the hash matches as youc an see.
eu-unstrip is "unstrip" and eu-readelf is "readelf" utility from the package
"elfutils".
Regards,
Jan
prev parent reply other threads:[~2010-04-19 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-14 21:42 Roy Smith
2010-04-15 18:24 ` Sergio Durigan Junior
2010-04-19 16:13 ` Jan Kratochvil [this message]
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=20100419161308.GA1430@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb@sourceware.org \
--cc=roy@panix.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