From: Mike Frysinger <vapier@gentoo.org>
To: gdb@sourceware.org
Subject: working with split debug files and sectionless ELFs
Date: Wed, 12 Oct 2011 17:36:00 -0000 [thread overview]
Message-ID: <201110121335.56792.vapier@gentoo.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]
i've been playing around with super stripping ELFs to the point where they no
longer have ELF sections (since they're not used at runtime). all of this
info has been preserved though in the split debug file. eu-strip makes this
very easy to pull off:
eu-strip /usr/bin/prog --strip-sections \
-f /usr/lib/debug/usr/bin/prog.debug
first, it seems that --symbols silently conflicts with specifying binaries on
the command line. so if i do:
gdb prog --symbols=/usr/lib/debug/usr/bin/prog.debug
the --symbols argument is silently ignored and gdb complains about no
debugging information found. if however i do:
gdb --symbols=/usr/lib/debug/usr/bin/prog.debug --exec=/usr/bin/prog
then everything works nicely. i can imagine that people aren't keen on
changing this behavior so it works (imo) a bit more naturally, but should we
at least have gdb warn that --symbols is ignored when given an executable on
the command line ? the --help output doesn't seem to mention this that i can
see.
second, i wonder if we can't have this work more intelligently out of the box.
is it unreasonable to have gdb automatically search /usr/lib/debug/ for split
debuf files if the .gnu_debuglink section does not exist ? or at least do it
if the ELF has no sections at all ? it'd be nice if we could do `gdb prog`
and gdb is smart enough to at least check /usr/lib/debug/usr/bin/prog.debug.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2011-10-12 17:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 17:36 Mike Frysinger [this message]
2011-10-14 14:23 ` Aleksandar Ristovski
2011-10-14 15:27 ` Mike Frysinger
2011-10-14 15:37 ` Mike Frysinger
2011-10-14 15:42 ` Aleksandar Ristovski
2011-10-14 16:00 ` Jan Kratochvil
2011-10-14 16:47 ` Jan Kratochvil
2011-10-14 17:08 ` Mike Frysinger
2011-10-14 17:29 ` Jan Kratochvil
2011-10-15 5:28 ` Mike Frysinger
2011-10-14 17:20 ` Mike Frysinger
2011-10-14 17:31 ` Jan Kratochvil
2011-10-14 17:34 ` Aleksandar Ristovski
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=201110121335.56792.vapier@gentoo.org \
--to=vapier@gentoo.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).