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 gdb/17917] gdbserver should lookup build-ids in the remote binaries
Date: Wed, 20 Oct 2021 01:08:04 +0000	[thread overview]
Message-ID: <bug-17917-4717-WRD5zVBdlc@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 #5 from daniel at mariadb dot org <daniel at mariadb dot org> ---
confirmed. Thanks Simon and Tom.

$ podman run --rm -d -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 --cap-add
CAP_SYS_PTRACE --name mdb-debug -p 2345:2345 
quay.io/mariadb-foundation/mariadb-debug:10.5



$ podman exec mdb-debug ls -la
/usr/lib/debug/.build-id/../.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug
-rw-r--r--. 1 root root 120877312 Oct  6 15:21
/usr/lib/debug/.build-id/../.build-id/6e/0a874dca5a7ff831396ddc0785d939a192efe3.debug


$ podman exec -ti mdb-debug gosu mysql gdbserver --attach  :2345 1
Attached; pid = 1
Listening on port 2345

$ ./gdb
GNU gdb (GDB) 12.0.50.20211020-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".

(gdb) set debug-file-directory /usr/lib/debug

(gdb) target extended-remote  :2345

Remote debugging using :2345
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...
...


(gdb) bt
#0  0x00007fc9db431aff in poll () from target:/lib/x86_64-linux-gnu/libc.so.6
#1  0x000055b62ef2593f in poll (__timeout=-1, __nfds=2, __fds=0x7ffe0342f520)
at /usr/include/x86_64-linux-gnu/bits/poll2.h:41
#2  handle_connections_sockets () at ./sql/mysqld.cc:6207
#3  0x000055b62ef2674d in mysqld_main (argc=<optimized out>, argv=<optimized
out>) at ./sql/mysqld.cc:5656
#4  0x00007fc9db3430b3 in __libc_start_main () from
target:/lib/x86_64-linux-gnu/libc.so.6
#5  0x000055b62ef1adae in _start ()


Full line numbers. And the build-id from the target is read.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-10-20  1:08 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
2021-10-19 17:42 ` tromey at sourceware dot org
2021-10-20  1:08 ` daniel at mariadb dot org [this message]
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-WRD5zVBdlc@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).