public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/17917] gdbserver should lookup build-ids in the remote binaries Date: Tue, 19 Oct 2021 17:30:16 +0000 [thread overview] Message-ID: <bug-17917-4717-7dllzqT28R@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-17917-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=17917 --- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Simon Marchi <simark@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4a2f674a688df474639066922f4ce70ce97b30d2 commit 4a2f674a688df474639066922f4ce70ce97b30d2 Author: Daniel Black <daniel@mariadb.org> Date: Mon Oct 18 17:06:47 2021 +1100 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 -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-10-19 17:30 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-03 7:09 [Bug gdb/17917] New: " eseidel at google dot com 2021-08-28 3:39 ` [Bug gdb/17917] " daniel at mariadb dot org 2021-08-28 6:51 ` daniel at mariadb dot org 2021-10-19 17:30 ` cvs-commit at gcc dot gnu.org [this message] 2021-10-19 17:42 ` tromey at sourceware dot org 2021-10-20 1:08 ` daniel at mariadb dot org 2021-10-20 2:06 ` tromey at sourceware dot org 2021-10-20 4:42 ` daniel at mariadb dot org 2023-01-02 19:31 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-17917-4717-7dllzqT28R@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).