Re: Remote debugging over local domain sockets?

John Darrington
2018-08-29T15:28:28Z

On Wed, Aug 29, 2018 at 09:17:00AM -0600, Tom Tromey wrote:
>>>>> "John" == John Darrington <john@darrington.wattle.id.au> writes:

John> So far as I'm aware, it's not possible to run a remote target over
John> a local domain (AF_UNIX) socket.

John> Would you accept a patch which changes the behaviour of "target
John> remote /foo/bar" such that if /foo/bar is a socket, gdb will
John> connect to that socket instead of trying to open it as a device?

How about stat'ing the path and doing the right thing depending on
whether it is a device or a socket?

That was my idea.

Alternatively, how about new syntax instead? "target remote /path" has meant
to open a serial device since forever. However there's also syntax like
"target remote udp:host:port". So maybe "target remote socket:/path"?

You mean where 'socket' is the literal string "socket" ? That might
also work, but one would have to consider what would happen if somebody
wanted to connect to a remote host called "socket" .

I prefer the first idea.

--
Avoid eavesdropping. Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.