This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/21785] sysroot option does not apply to standalone debug
- From: "emaste at freebsd dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 18 Jul 2017 21:19:46 +0000
- Subject: [Bug gdb/21785] sysroot option does not apply to standalone debug
- Auto-submitted: auto-generated
- References: <bug-21785-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21785
--- Comment #1 from emaste at freebsd dot org ---
Background: debugging a FreeBSD/i386 core file from an application running in a
chroot on FreeBSD/amd64.
I start gdb while in the top-level directory of my chroot dir, and set the
sysroot to . and open the core file:
(gdb) set sysroot .
(gdb) core-file sh.core
[New LWP 100854]
warning: the debug information found in
"/usr/lib/debug/./lib/libedit.so.7.debug" does not match "./lib/libedit.so.7"
(CRC mismatch).
warning: the debug information found in "/usr/lib/debug/./lib/libc.so.7.debug"
does not match "./lib/libc.so.7" (CRC mismatch).
warning: the debug information found in
"/usr/lib/debug/./lib/libncursesw.so.8.debug" does not match
"./lib/libncursesw.so.8" (CRC mismatch).
warning: the debug information found in
"/usr/lib/debug/./libexec/ld-elf.so.1.debug" does not match
"./libexec/ld-elf.so.1" (CRC mismatch).
Core was generated by `sh'.
Program terminated with signal SIGABRT, Aborted.
#0 0x012589d3 in thr_kill () from ./lib/libc.so.7
The .so files have a .gnu_debuglink entry of "libedit.so.7.debug", and GDB duly
searches for this file in the standalone debug path list (from ktrace):
./lib/libedit.so.7.debug
./lib/.debug/libedit.so.7.debug
/usr/lib/debug/./lib/libedit.so.7.debug
It finds libedit.so.7.debug on the third try, but it is the system's
libedit.so.7.debug found by absolute path, not the desired sysroot one; the
sysroot should be prepended to absolute debug search paths, so that we find
./usr/lib/debug/./lib/libedit.so.7.debug
--
You are receiving this mail because:
You are on the CC list for the bug.