public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "daniel at mariadb dot org" <sourceware-bugzilla@sourceware.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 [thread overview]
Message-ID: <bug-16622-4717-QzE6I7eZHC@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-16622-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16622
--- Comment #2 from daniel at mariadb dot org <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 gdbserver \
&& 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=SYS_PTRACE --volume mdbdata:/var/lib/mysql -p 2345:2345
--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.debug
from remote target...
Reading /usr/lib/debug/usr/sbin//e5c6ca8600f8f6ec5fd85ef069200b1cdb3c7d.debug
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='*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.debug"
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 than a
directory in this path, even if it complicates a bit of compatibility.
Thanks for your consideration.
--
You are receiving this mail because:
You are on the CC list for the bug.
prev parent reply other threads:[~2021-05-27 6:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 15:57 [Bug remote/16622] New: " jan.kratochvil at redhat dot com
2021-05-27 2:35 ` [Bug remote/16622] " daniel at mariadb dot org
2021-05-27 6:20 ` daniel at mariadb dot org [this message]
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-16622-4717-QzE6I7eZHC@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: link
Be 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).