From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BECC03844012; Thu, 27 May 2021 06:20:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BECC03844012 From: "daniel at mariadb dot org" To: gdb-prs@sourceware.org Subject: [Bug remote/16622] set sysroot remote: is not enough for set debug-file-directory Date: Thu, 27 May 2021 06:20:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel at mariadb dot 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: Thu, 27 May 2021 06:20:39 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D16622 --- Comment #2 from daniel at mariadb dot org -= -- I hit this also in an attempt to use gdbserver within a container where the container's debug symbols could be easily installed such that we'd be testing/debugging in the same environment where the original problem experienced. FROM mariadb:10.6 RUN sed -i -e 's/$/ main\/debug/' /etc/apt/sources.list.d/mariadb.list \ && apt-get update \ && apt-get install -y mariadb-server-core-$MARIADB_MAJOR-dbgsym gdbserv= er \ && rm -rf /var/lib/apt/lists/* EXPOSE 2345 USER mysql CMD ["gdbserver", "localhost:2345", "mysqld"] After running the container file above: podman run --cap-add=3DSYS_PTRACE --volume mdbdata:/var/lib/mysql -p 2345= :2345=20 --name mdb10.6 --rm mariadb_local:10.6-debug >>From the host: (gdb) set debug-file-directory target:/usr/lib/debug (gdb) target remote localhost:2345 Remote debugging using localhost:2345 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/e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.debug from remote target... Reading /usr/sbin/.debug/e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.debug from remote target... Reading target//usr/sbin/e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.debug from remote target... Reading target/usr/sbin//e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.debug from remote target... Reading target:target/usr/sbin//e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.debug from remote target... Reading /usr/lib/debug//usr/sbin/e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.deb= ug from remote target... Reading /usr/lib/debug/usr/sbin//e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.deb= ug from remote target... Reading target:/usr/lib/debug/usr/sbin//e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.debug from remote target... Missing separate debuginfo for target:/usr/sbin/mariadbd Try: dnf --enablerepo=3D'*debug*' install /usr/lib/debug/.build-id/b9/e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.debug ... Container is a ubuntu:focal based so the Fedora gdb path resolution is a bit mismatched, however if "set debug-file-directory target:/usr/lib/debug" was processed, then the next manual "symbol target:/usr/lib/debug/.build-id/b9/e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.d= ebug" to load it won't have been necessary. While getting the right overlayfs directory would avoid the "target:" need = it quickly falls afoul of selinux and user id mapping complications. So it would be really nice if target: could actually mean target rather tha= n a directory in this path, even if it complicates a bit of compatibility. Thanks for your consideration. --=20 You are receiving this mail because: You are on the CC list for the bug.=