http://bugzilla.opensuse.org/show_bug.cgi?id=1150918
Bug ID: 1150918
Summary: LTO breaks debuginfo, no line info anymore
Classification: openSUSE
Product: openSUSE Tumbleweed
Version: Current
Hardware: x86-64
OS: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Development
Assignee: martin.liska@suse.com
Reporter: jengelh@inai.de
QA Contact: qa-bugs@suse.de
Blocks: 1133084
Found By: ---
Blocker: ---
Trying to step into the ldap_initialize function with gdb's "s" command has no
effect; gdb skips over it. The "si" command enters it, but no source code is
shown. This suggests debuginfo is missing from openldap2. However, all the -g
flags are there and stripping is disabled.
Rebuilding openldap2 with `%define lto_cflags %nil` cures the problem,
therefore I conclude LTO is at fault of messing up the debuginfo.
== Input ==
$ cat x.cpp
#include
int main()
{
LDAP *ld;
ldap_initialize(&ld, "");
}
$ g++ x.cpp -Wall -ggdb3
$ zypper in openldap2-debuginfo openldap2-debugsource libldap-2_4-2-debuginfo
== Observed ==
gdb does not show the source code for the ldap_initialize function. This is
probably because debuginfo is missing.
$ LD_BIND_NOW=1 gdb a.out
...
(gdb) b main
Breakpoint 1 at 0x113d: file x.cpp, line 5.
(gdb) r
Starting program: /dev/shm/a.out
Missing separate debuginfo for /lib64/libgcc_s.so.1
Try: zypper install -C
"debuginfo(build-id)=61600d59ddb87699663206a26c0106e42bf11199"
Missing separate debuginfo for /usr/lib64/libsasl2.so.3
Try: zypper install -C
"debuginfo(build-id)=a79af1f708895503413b5ea76bf4b342e4c2ea61"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, main () at x.cpp:5
5 ldap_initialize(&ld, "");
(gdb) si
0x0000555555555141 5 ldap_initialize(&ld, "");
(gdb)
0x0000555555555148 5 ldap_initialize(&ld, "");
(gdb)
0x000055555555514b 5 ldap_initialize(&ld, "");
(gdb)
0x0000555555555030 in ldap_initialize@plt ()
(gdb)
0x00007ffff7f9e6a0 in ldap_initialize () from /usr/lib64/libldap_r-2.4.so.2
(gdb)
0x00007ffff7f9e6a2 in ldap_initialize () from /usr/lib64/libldap_r-2.4.so.2
(gdb)
== What I expected instead ==
That gdb shows me "open.c" and the source code of ldap_initialize.
(gdb) b main
Breakpoint 1 at 0x113d: file x.cpp, line 5.
(gdb) r
Starting program: /dev/shm/a.out
Missing separate debuginfo for /lib64/libgcc_s.so.1
Try: zypper install -C
"debuginfo(build-id)=61600d59ddb87699663206a26c0106e42bf11199"
Missing separate debuginfo for /usr/lib64/libsasl2.so.3
Try: zypper install -C
"debuginfo(build-id)=a79af1f708895503413b5ea76bf4b342e4c2ea61"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, main () at x.cpp:5
5 ldap_initialize(&ld, "");
(gdb) s
ldap_initialize (ldp=0x7fffffffdca8, url=0x555555556004 "") at open.c:236
236 {
--
You are receiving this mail because:
You are on the CC list for the bug.