diff options
author | Daniel Black <daniel@mariadb.org> | 2021-10-18 17:06:47 +1100 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2021-10-19 13:30:00 -0400 |
commit | 4a2f674a688df474639066922f4ce70ce97b30d2 (patch) | |
tree | c540bbb00b0f938700daa9e4672c80ab48335a11 /gdb/ada-lang.c | |
parent | cf487499e0d7ef64ab63d6c76bf298bfaf64b980 (diff) | |
download | gdb-4a2f674a688df474639066922f4ce70ce97b30d2.zip gdb-4a2f674a688df474639066922f4ce70ce97b30d2.tar.gz gdb-4a2f674a688df474639066922f4ce70ce97b30d2.tar.bz2 |
Fix PR gdb/17917 Lookup build-id in remote binaries
GDB doesn't support loading debug files using build-id from remote
target filesystems.
This is the case when gdbserver attached to a process and a gdb target
remote occurs over tcp.
With this change we make build-id lookups possible:
(gdb) show debug-file-directory
The directory where separate debug symbols are searched for is "/usr/local/lib/debug".
(gdb) set debug-file-directory /usr/lib/debug
(gdb) show sysroot
The current system root is "target:".
(gdb) target extended-remote :46615
Remote debugging using :46615
warning: Can not parse XML target description; XML support was disabled at compile time
Reading /usr/sbin/mariadbd from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /usr/sbin/mariadbd from remote target...
Reading symbols from target:/usr/sbin/mariadbd...
Reading /usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
Reading /usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
Reading symbols from target:/usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug...
Reading /lib/x86_64-linux-gnu/libpcre2-8.so.0 from remote target...
...
Before this change, the lookups would have been (GNU gdb (GDB) Fedora 10.2-3.fc34):
(gdb) target extended-remote :46615
Remote debugging using :46615
Reading /usr/sbin/mariadbd from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /usr/sbin/mariadbd from remote target...
Reading symbols from target:/usr/sbin/mariadbd...
Reading /usr/sbin/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
Reading /usr/sbin/.debug/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
Reading /usr/lib/debug//usr/sbin/0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
Reading /usr/lib/debug/usr/sbin//0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
Reading target:/usr/lib/debug/usr/sbin//0a874dca5a7ff831396ddc0785d939a192efe3.debug from remote target...
Missing separate debuginfo for target:/usr/sbin/mariadbd
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug
(No debugging symbols found in target:/usr/sbin/mariadbd)
Observe it didn't look for
/usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug
on the remote target (where it is) and expected them to be installed
locally.
As a minor optimization, this also changes the build-id lookup such that
if sysroot is empty, no second lookup of the same location is performed.
Change-Id: I5181696d271c325a25a0805a8defb8ab7f9b3f55
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17917
Diffstat (limited to 'gdb/ada-lang.c')
0 files changed, 0 insertions, 0 deletions