This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/21785] sysroot option does not apply to standalone debug


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]