This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug backtrace/11908] Debugging PIE works with core dump, but not "live"
- From: "jan dot kratochvil at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 15 Aug 2010 22:50:29 -0000
- Subject: [Bug backtrace/11908] Debugging PIE works with core dump, but not "live"
- References: <20100812084914.11908.devurandom@gmx.net>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jan dot kratochvil at redhat dot com 2010-08-15 22:50 -------
(In reply to comment #5)
> I also see it only on my hardened box.
BTW I forgot to state that I really tested it for PIE:
gcc -o piebug piebug.c -Wall -pie -fPIE -g
> Maybe you have a tip for how I could get
> closer to the cause of this?
It crashed at 0x400007263aed0a90. At this moment see /proc/PID/maps, find which
file (library?) covers this address, subtract its based address. Then run new
GDB, load this file (library?), be sure to have its debug info (package
*-debuginfo.rpm, AFAIK *-dbg on Debian, unaware of Gentoo), and type some disass
or `info sym that-subtracted-address' (assuming prelink is not active at that
moment, otherwise add also the prelinked base address).
> What is different between showing the backtrace of a coredump and a running
> program?
I am curious, GDB does not affect much the inferior run, it more starts its work
at the moment it crashes. Maybe you can also try to put some sleep() into the
testcase and test how does it for for an "attach"ed inferior program.
In fact you can also type (gdb) gcore at the crash moment for remote analysis.
OTOH I am reluctant for more debugging as it seems to be more a Gentoo specific
problem and you should rather file it for Gentoo.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11908
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.