From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD1D83858D39; Tue, 19 Oct 2021 17:30:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD1D83858D39 From: "cvs-commit at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2021 17:30:16 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D17917 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Simon Marchi : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D4a2f674a688d= f474639066922f4ce70ce97b30d2 commit 4a2f674a688df474639066922f4ce70ce97b30d2 Author: Daniel Black 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 disa= bled 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 fr= om remote target... Reading /usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug fr= om remote target... Reading symbols from target:/usr/lib/debug/.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.d= ebug... 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.deb= ug 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=3D'*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=3D17917 --=20 You are receiving this mail because: You are on the CC list for the bug.=