From: Martin Simmons <qqxnjvamvxwx@dyxyl.com>
To: Rick van Rein <rick@openfortress.nl>
Cc: gdb@sourceware.org
Subject: Re: howto? gdb --> AF_UNIX --> gdbserver
Date: Sat, 19 Dec 2020 17:10:13 +0000 [thread overview]
Message-ID: <jeblepvi16.fsf@dyxyl.com> (raw)
In-Reply-To: <5FDE1353.9030700@openfortress.nl> (message from Rick van Rein via Gdb on Sat, 19 Dec 2020 15:50:59 +0100)
>>>>> On Sat, 19 Dec 2020 15:50:59 +0100, Rick van Rein via Gdb said:
>
> Our project uses a test program [0][1] that automatically runs and
> connects test processes. It would be useful to debug one or more of
> these in their connected context. The best match would be to use a
> socket file name relative to the testdir, rather than a numeric port
> shared with the entire host.
>
> * I cannot figure out how to tell gdbserver to listen to a UNIX domain
> socket at a given filename. I would expect it to listen, like it does
> for TCP sockets, but it complains that the name is missing.
You can't do this with gdbserver itself, but you can wrap it with nc,
e.g.
rm $unix-domain-socket
nc -Ul -e "gdbserver --no-startup-with-shell stdio $program-to-debug" $unix-domain-socket
> * Using gdb with "target remote", the same thing seems to happen; it
> seems to want a pre-existing UNIX domain socket. This _is_ in line with
> the TCP style of connecting.
Yes, if the argument to "target remote" is an existing UNIX domain
socket name then gdb will connect to it.
__Martin
next prev parent reply other threads:[~2020-12-19 17:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-19 14:50 Rick van Rein
2020-12-19 17:10 ` Martin Simmons [this message]
2020-12-22 10:15 ` Rick van Rein
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=jeblepvi16.fsf@dyxyl.com \
--to=qqxnjvamvxwx@dyxyl.com \
--cc=gdb@sourceware.org \
--cc=rick@openfortress.nl \
/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).