public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug remote/29929] New: gdb looks for "target:" file on the target @ 2022-12-21 20:48 tromey at sourceware dot org 2022-12-21 21:00 ` [Bug remote/29929] " tromey at sourceware dot org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: tromey at sourceware dot org @ 2022-12-21 20:48 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29929 Bug ID: 29929 Summary: gdb looks for "target:" file on the target Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: remote Assignee: unassigned at sourceware dot org Reporter: tromey at sourceware dot org Target Milestone: --- A simple way to reproduce this bug is to: $ gdb /bin/ls (gdb) target remote | gdbserver - /bin/ls (gdb) cont If you examine the output, you'll see something like: Reading target:/usr/lib/debug/lib64//libcap.so.2.48-2.48-4.fc36.x86_64.debug from remote target... That "target:" is leaking through to the remote, which is nonsensical. It comes from this code in find_separate_debug_file: debugfile = target_prefix ? "target:" : ""; debugfile += gdb_sysroot; debugfile += debugdir; (top-gdb) p gdb_sysroot $18 = "target:" -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug remote/29929] gdb looks for "target:" file on the target 2022-12-21 20:48 [Bug remote/29929] New: gdb looks for "target:" file on the target tromey at sourceware dot org @ 2022-12-21 21:00 ` tromey at sourceware dot org 2023-01-02 13:55 ` cvs-commit at gcc dot gnu.org 2023-01-02 13:56 ` tromey at sourceware dot org 2 siblings, 0 replies; 4+ messages in thread From: tromey at sourceware dot org @ 2022-12-21 21:00 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29929 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at sourceware dot org |tromey at sourceware dot org --- Comment #1 from Tom Tromey <tromey at sourceware dot org> --- https://sourceware.org/pipermail/gdb-patches/2022-December/194995.html -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug remote/29929] gdb looks for "target:" file on the target 2022-12-21 20:48 [Bug remote/29929] New: gdb looks for "target:" file on the target tromey at sourceware dot org 2022-12-21 21:00 ` [Bug remote/29929] " tromey at sourceware dot org @ 2023-01-02 13:55 ` cvs-commit at gcc dot gnu.org 2023-01-02 13:56 ` tromey at sourceware dot org 2 siblings, 0 replies; 4+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2023-01-02 13:55 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29929 --- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dacf80765d51be840d2efc20bc058643d88ec49f commit dacf80765d51be840d2efc20bc058643d88ec49f Author: Tom Tromey <tromey@adacore.com> Date: Wed Dec 21 13:57:45 2022 -0700 Remove target: prefix from gdb_sysroot in find_separate_debug_file I noticed that, when using gdbserver, gdb might print: Reading /usr/lib/debug/lib64//libcap.so.2.48-2.48-4.fc36.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//libcap.so.2.48-2.48-4.fc36.x86_64.debug from remote target... The second line has the "target:" prefix, but from the code it's clear that this string is being passed verbatim to gdbserver -- which seems wrong. I filed PR remote/29929 for this. The problem here is that find_separate_debug_file uses gdb_sysroot without checking to see if it starts with the "target:" prefix. This patch changes this code to be a little more careful. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29929 -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug remote/29929] gdb looks for "target:" file on the target 2022-12-21 20:48 [Bug remote/29929] New: gdb looks for "target:" file on the target tromey at sourceware dot org 2022-12-21 21:00 ` [Bug remote/29929] " tromey at sourceware dot org 2023-01-02 13:55 ` cvs-commit at gcc dot gnu.org @ 2023-01-02 13:56 ` tromey at sourceware dot org 2 siblings, 0 replies; 4+ messages in thread From: tromey at sourceware dot org @ 2023-01-02 13:56 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29929 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Target Milestone|--- |14.1 --- Comment #3 from Tom Tromey <tromey at sourceware dot org> --- Fixed. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-02 13:56 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-12-21 20:48 [Bug remote/29929] New: gdb looks for "target:" file on the target tromey at sourceware dot org 2022-12-21 21:00 ` [Bug remote/29929] " tromey at sourceware dot org 2023-01-02 13:55 ` cvs-commit at gcc dot gnu.org 2023-01-02 13:56 ` tromey at sourceware dot org
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).