From: John Gilmore <gnu@toad.com>
To: gdb@sourceware.org, gnu@toad.com
Cc: Martin Langhoff <martin.langhoff@gmail.com>
Subject: Reading dynamic symbols from Linux core files?
Date: Fri, 16 Mar 2012 18:39:00 -0000 [thread overview]
Message-ID: <201203161838.q2GIceWD010681@new.toad.com> (raw)
Martin Langhoff of laptop.org is trying to debug an intermittent bug
in the One Laptop Per Child that results in a core dump of a Python
process. The bug report (including the gzipped core file) is here:
http://dev.laptop.org/ticket/11698
Martin and Jan Kratochvil are currently chasing a problem with finding
and getting "debug symbol" packages in Fedora 14 (which this OLPC
software release is based on). But in the process of helping them, I
also noticed that merely running:
$ gdb - core.522
on the core file doesn't provide access to most symbols from the dynamic
symbol table.
Oddly, "info functions" does produce three non-debugging symbols, but
nothing else. Gdb knows that the second thread is stopped in
__kernel_vsyscall() but doesn't know much else. See attached
transcript.
The internal structure of GDB has changed enough that I'm not sure
exactly where in the code it should be trying to find the dynamic
symbol table from the core file and extracting the symbols from it. I
remember making this work many years ago in GDB, which made it much
more useful when debugging executables that had no symbols, and core
files for which matching executables were hard to come by.
Have any clues for me?
John
$ gdb - /tmp/core.522
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
-: No such file or directory.
[New Thread 522]
[New Thread 603]
Core was generated by `python /usr/bin/sugar-session'.
Program terminated with signal 11, Segmentation fault.
#0 0xa7183e2e in ?? ()
(gdb) i fun
All defined functions:
Non-debugging symbols:
0xa78be400 __kernel_sigreturn
0xa78be40c __kernel_rt_sigreturn
0xa78be414 __kernel_vsyscall
(gdb) bt
#0 0xa7183e2e in ?? ()
#1 0x08f352d0 in ?? ()
#2 0xa6f0ae57 in ?? ()
#3 0x08cea354 in ?? ()
#4 0xa7771878 in ?? ()
#5 0x00000000 in ?? ()
(gdb) i threads
2 Thread 603 0xa78be424 in __kernel_vsyscall ()
* 1 Thread 522 0xa7183e2e in ?? ()
(gdb) thread 2
[Switching to thread 2 (Thread 603)]#0 0xa78be424 in __kernel_vsyscall ()
(gdb) bt
#0 0xa78be424 in __kernel_vsyscall ()
#1 0xa75f6c36 in ?? ()
#2 0xffffffff in ?? ()
#3 0x00000001 in ?? ()
#4 0xa724b27c in ?? ()
#5 0xa718edac in ?? ()
#6 0xa55023c0 in ?? ()
#7 0xa717e8b7 in ?? ()
#8 0xa55023c0 in ?? ()
#9 0xa717f04b in ?? ()
#10 0x00000001 in ?? ()
#11 0x00000001 in ?? ()
#12 0xa5e18328 in ?? ()
#13 0xa70cbed5 in ?? ()
#14 0x088bd0b0 in ?? ()
#15 0xa71a7bd0 in ?? ()
#16 0x00000000 in ?? ()
(gdb)
next reply other threads:[~2012-03-16 18:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 18:39 John Gilmore [this message]
2012-03-16 18:48 ` Jan Kratochvil
2012-03-16 19:57 ` Martin Langhoff
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=201203161838.q2GIceWD010681@new.toad.com \
--to=gnu@toad.com \
--cc=gdb@sourceware.org \
--cc=martin.langhoff@gmail.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