From: Paul Smith <psmith@gnu.org>
To: gdb@sourceware.org
Subject: Classifying core files?
Date: Tue, 09 Dec 2008 17:09:00 -0000 [thread overview]
Message-ID: <1228842548.2017.64.camel@psmith-ubeta.netezza.com> (raw)
Hi all;
I have a situation where I'm collecting cores from a wide variety of
(well-defined) systems: there are cores from other architectures (where
I need a cross debugger), cores from different executables, cores that
require special extra shared objects to be available (because they
dlopen() things), etc.
What I have at my disposal is a bunch of local and cross-debuggers and
gcc/binutils suites, a bunch of potential executables that cores could
come from, and a bunch of shared objects that might or might not have
been loaded. And, a core file.
What I'm trying to do is generate a script that can determine the right
set of GDB executable, GDB command line options (to "set sysroot",
etc.), etc., starting with only the core file itself as information,
then invoke GDB properly.
What options do I have to help me do this? About all I have is using
"file" or maybe "readelf" to find the hardware type, so I can guess
more-or-less which cross-GDB I might need. Then when I start GDB with
the core it will say something like "Core was generated by `someapp'."
Once I have the executable I can use "info shared" to find missing
dynamic objects.
This seems brittle, esp. the first part using "file" and parsing the
output of GDB to find the executable. Does anyone have any better
options? Are there any "info" operations in GDB I could use, given
_only_ the core file, that can help me? What about some way of tagging
the executables themselves, either with a string or somehow in the
executable ELF image that would get added to the core, that I could
query given just the resulting core file?
Any ideas would be welcome. Thanks!
next reply other threads:[~2008-12-09 17:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 17:09 Paul Smith [this message]
2008-12-09 17:33 ` Daniel Jacobowitz
2008-12-10 22:15 ` Jan Kratochvil
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=1228842548.2017.64.camel@psmith-ubeta.netezza.com \
--to=psmith@gnu.org \
--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