public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug server/29652] New: [gdbserver] Keeping symbols between two gdbserver sessions breaks second session Date: Wed, 05 Oct 2022 09:19:56 +0000 [thread overview] Message-ID: <bug-29652-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29652 Bug ID: 29652 Summary: [gdbserver] Keeping symbols between two gdbserver sessions breaks second session Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: server Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- Consider the following 2 consecutive gdbserver sessions, separated by "file": ... $ gdb -q -batch \ -ex "target remote | gdbserver - ~/a.out" \ -ex continue \ -ex "file" \ -ex "target remote | gdbserver - ~/a.out" \ -ex continue stdin/stdout redirected Process /home/vries/a.out created; pid = 28666 Remote debugging using stdio Reading /home/vries/a.out from remote target... warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead. Reading /home/vries/a.out from remote target... Reading symbols from target:/home/vries/a.out... Reading /lib64/ld-linux-x86-64.so.2 from remote target... Reading /lib64/ld-linux-x86-64.so.2 from remote target... Reading /usr/lib/debug/.build-id/5c/abd6dddf6c61859687ee6a3c3273fe4c01c68b.debug from remote target... Reading /lib64/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /lib64/.debug/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug//lib64/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/lib64//ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/.build-id/26/7a3e00bc5c234ec8c0c4c68ca478a2844e3338.debug from remote target... 0x00007ffff7dd4550 in _start () from target:/lib64/ld-linux-x86-64.so.2 Reading /lib64/libc.so.6 from remote target... Reading /usr/lib/debug/.build-id/c8/417d767baccfadb39b474e484d46947915cd8f.debug from remote target... Reading /lib64/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /lib64/.debug/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug//lib64/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/lib64//libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... hello [Inferior 1 (process 28666) exited normally] stdin/stdout redirected Process /home/vries/a.out created; pid = 28720 Remote debugging using stdio Reading /home/vries/a.out from remote target... Reading /home/vries/a.out from remote target... Reading symbols from target:/home/vries/a.out... Reading /lib64/ld-linux-x86-64.so.2 from remote target... Reading /lib64/ld-linux-x86-64.so.2 from remote target... Reading /usr/lib/debug/.build-id/5c/abd6dddf6c61859687ee6a3c3273fe4c01c68b.debug from remote target... Reading /lib64/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /lib64/.debug/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug//lib64/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/lib64//ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/.build-id/26/7a3e00bc5c234ec8c0c4c68ca478a2844e3338.debug from remote target... 0x00007ffff7dd4550 in _start () from target:/lib64/ld-linux-x86-64.so.2 Reading /lib64/libc.so.6 from remote target... Reading /usr/lib/debug/.build-id/c8/417d767baccfadb39b474e484d46947915cd8f.debug from remote target... Reading /lib64/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /lib64/.debug/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug//lib64/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/lib64//libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... hello [Inferior 1 (process 28720) exited normally] $ ... The two sessions are fairly similar. The 'warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead' only occurs in the first session. Also not sure why in both cases we're claiming to load a.out twice (more clear in the second session, in the first session the warning is inbetween): ... Reading /home/vries/a.out from remote target... Reading /home/vries/a.out from remote target... ... Anyway, if we remove the file command, we have instead: ... $ gdb -q -batch \ -ex "target remote | gdbserver - ~/a.out" \ -ex continue \ -ex "target remote | gdbserver - ~/a.out" \ -ex continue stdin/stdout redirected Process /home/vries/a.out created; pid = 27584 Remote debugging using stdio Reading /home/vries/a.out from remote target... warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead. Reading /home/vries/a.out from remote target... Reading symbols from target:/home/vries/a.out... Reading /lib64/ld-linux-x86-64.so.2 from remote target... Reading /lib64/ld-linux-x86-64.so.2 from remote target... Reading /usr/lib/debug/.build-id/5c/abd6dddf6c61859687ee6a3c3273fe4c01c68b.debug from remote target... Reading /lib64/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /lib64/.debug/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug//lib64/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/lib64//ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/.build-id/26/7a3e00bc5c234ec8c0c4c68ca478a2844e3338.debug from remote target... 0x00007ffff7dd4550 in _start () from target:/lib64/ld-linux-x86-64.so.2 Reading /lib64/libc.so.6 from remote target... Reading /usr/lib/debug/.build-id/c8/417d767baccfadb39b474e484d46947915cd8f.debug from remote target... Reading /lib64/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /lib64/.debug/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug//lib64/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/lib64//libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... hello [Inferior 1 (process 27584) exited normally] `target:/home/vries/a.out' has disappeared; keeping its symbols. stdin/stdout redirected Process /home/vries/a.out created; pid = 27588 Remote debugging using stdio warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. Reading /usr/lib/debug/.build-id/26/7a3e00bc5c234ec8c0c4c68ca478a2844e3338.debug from remote target... 0x00007ffff7dd4550 in ?? () Reading /lib64/libc.so.6 from remote target... Reading /lib64/ld-linux-x86-64.so.2 from remote target... Reading /usr/lib/debug/.build-id/c8/417d767baccfadb39b474e484d46947915cd8f.debug from remote target... Reading /lib64/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /lib64/.debug/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug//lib64/libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/lib64//libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//libc-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/.build-id/5c/abd6dddf6c61859687ee6a3c3273fe4c01c68b.debug from remote target... Reading /lib64/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /lib64/.debug/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug//lib64/ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading /usr/lib/debug/lib64//ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//ld-2.31.so-2.31-150300.41.1.x86_64.debug from remote target... hello [Inferior 1 (process 27588) exited normally] ... Now we have: ... `target:/home/vries/a.out' has disappeared; keeping its symbols. ... and then we run into trouble: ... warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. Reading /usr/lib/debug/.build-id/26/7a3e00bc5c234ec8c0c4c68ca478a2844e3338.debug from remote target... 0x00007ffff7dd4550 in ?? () ... in other words, gdb doesn't realize that we're stopped at _start. I'd expect the first and second session to look roughly the same again. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-10-05 9:19 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-05 9:19 vries at gcc dot gnu.org [this message] 2022-10-05 9:25 ` [Bug server/29652] " vries at gcc dot gnu.org 2022-10-05 9:51 ` vries at gcc dot gnu.org 2022-10-05 10:04 ` vries at gcc dot gnu.org 2022-10-05 10:40 ` vries at gcc dot gnu.org 2022-10-05 10:43 ` vries at gcc dot gnu.org 2022-10-05 12:54 ` vries at gcc dot gnu.org 2022-10-05 12:54 ` vries at gcc dot gnu.org 2022-10-05 12:58 ` vries at gcc dot gnu.org 2022-10-05 15:43 ` vries at gcc dot gnu.org 2022-10-12 15:42 ` vries at gcc dot gnu.org 2022-10-20 8:42 ` vries at gcc dot gnu.org 2022-10-20 8:44 ` vries at gcc dot gnu.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-29652-4717@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: linkBe 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).