This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug backtrace/22785] New: Cannot find assertion failure position on PIC glibc, after recompiling
- From: "mirco.giacobbe at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 04 Feb 2018 13:05:46 +0000
- Subject: [Bug backtrace/22785] New: Cannot find assertion failure position on PIC glibc, after recompiling
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22785
Bug ID: 22785
Summary: Cannot find assertion failure position on PIC glibc,
after recompiling
Product: gdb
Version: 8.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: backtrace
Assignee: unassigned at sourceware dot org
Reporter: mirco.giacobbe at gmail dot com
Target Milestone: ---
It seems that gdb fails finding the code position of assertion failures, after
I recompile my code. Consider the following example
#include <assert.h>
int main()
{
assert(0);
return 0;
}
On the first run of gdb, I get the correct backtrace
Program received signal SIGABRT, Aborted.
0x00007ffff7a5ff00 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff7a5ff00 in raise () from /lib64/libc.so.6
#1 0x00007ffff7a61baa in abort () from /lib64/libc.so.6
#2 0x00007ffff7a57cb7 in ?? () from /lib64/libc.so.6
#3 0x00007ffff7a57d72 in __assert_fail () from /lib64/libc.so.6
#4 0x00005555555546b3 in main () at main.c:5
I recompile the very same code; I issue "run" again; Gdb detects that the file
has changed and re-reads the symbols; The result is the following backtrace
Program received signal SIGABRT, Aborted.
0x00007ffff7a5ff00 in ?? ()
(gdb) bt
#0 0x00007ffff7a5ff00 in ?? ()
#1 0x0000000000000000 in ?? ()
At this point the "next" command responds with "Cannot find bounds of current
function". This does not occur if I re-read the symbols manually. Namely, if
recompile my code, I issue "file a.out" and then I issue "run", finally I get
the correct backtrace.
This problem has started happening after recompiling the whole system,
including the glibc, with the -fPIC flag.
--
You are receiving this mail because:
You are on the CC list for the bug.