From: Dmitry Antipov <dantipov@nvidia.com>
Cc: GDB Development <gdb@sourceware.org>
Subject: Spurious re-attach error with extended-remote target
Date: Mon, 25 Sep 2017 11:07:00 -0000 [thread overview]
Message-ID: <e4de2d6f-fe2a-91c8-6eb8-82c92a790582@nvidia.com> (raw)
In-Reply-To: <20170921185736.GA1625@host1.jankratochvil.net>
It seems that an attempt to re-attach to an existing PID fails after
an (unsuccessful) attempt to attach to a non-existing one. Example:
$ gdbserver --attach tcp:8888 $(pidof test)
Attached; pid = 5128
Listening on port 8888
Remote debugging from host 127.0.0.1
Detaching from process 5128
gdbserver: Cannot attach to process 12345: No such process (3)
Listening on port 8888
Attached; pid = 5128 ;; gdbserver says it's OK, but...
$ ./gdb/gdb -q
(gdb) set sysroot /
(gdb) target extended-remote :8888
Remote debugging using :8888
Reading symbols from /tmp/test...done.
Reading symbols from /lib64/libstdc++.so.6...(no debugging symbols found)...done.
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
0x00007f8fb3fae83d in pthread_join () from /lib64/libpthread.so.0
(gdb) detach
Detaching from program: /tmp/test, process 5128
(gdb) attach 12345 ;; no process with specified PID
Attaching to program: /tmp/test, process 12345
Attaching to process 12345 failed
(gdb) attach 5128
Attaching to program: /tmp/test, process 5128 ;;; hmm...
Unknown remote qXfer reply: T0006:0000000000000000;07:c00f7d81ff7f0000;10:3de8fab38f7f0000;thread:1408;core:3; ;;; problem?
(gdb)
(current HEAD at 57a024f4650d7562e963efb6b00c4a4cd74185c4, configured with
'--with-python=no --with-guile=no --disable-nls --disable-binutils --disable-ld
--disable-gold --disable-gas --disable-sim --disable-gprof').
Dmitry
prev parent reply other threads:[~2017-09-25 11:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 18:14 systemd-coredump in distros Andreas Arnez
2017-09-21 18:57 ` Jan Kratochvil
2017-09-21 22:56 ` R0b0t1
2017-09-25 11:07 ` Dmitry Antipov [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=e4de2d6f-fe2a-91c8-6eb8-82c92a790582@nvidia.com \
--to=dantipov@nvidia.com \
--cc=gdb@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