[PATCH] GDBSERVER: Listen on a unix domain (instead of TCP) socket if requested.

Pedro Alves palves@redhat.com
Tue Oct 9 19:06:00 GMT 2018


-- 
Thanks,
Pedro Alves
On 10/09/2018 08:00 PM, John Darrington wrote:
> On Tue, Oct 09, 2018 at 07:53:55PM +0100, Pedro Alves wrote:
>      On 10/09/2018 07:41 PM, John Darrington wrote:
>      > On Tue, Oct 09, 2018 at 07:02:14PM +0100, Pedro Alves wrote:
>      >      On 10/09/2018 06:32 PM, John Darrington wrote:
>      >      > When invoking gdbserver, if the COMM parameter does not include a colon (:) and
>      >      > is not the name of an existing character device, then a local (unix) domain
>      >      > socket will be created with that name and gdbserver will listen for connections
>      >      > on that.
>      >      
>      >      Is that "colon/no-colon" magic something that tools frequently do?
>      > 
>      > Not exactly.  Tools with which I'm familiar with work as follows:
>      > 
>      > :1234           Creates a unix domain socket on the local host called 1234
>      > localhost:1234  Listens on TCP port 1234
>      > 
>      > which is the way I think gdb ought to work, but this would be
>      > inconsistent with it's current behaviour and cause confusion if somebody
>      > used an old version of gdb with a new version of gdbserver or
>      > vici-versa.
>      
>      In that example you didn't even pass a path to a unix domain socket.
>      You let the tool create it, I suppose.  It doesn't feel like
>      apples to apples.
>      
>      In those tools you know, how would you pass the path to the local
>      socket then?
>      
> 
> If you give no path, it'll refer to a socket in the current working
> directory.  An example with a path would be  :/tmp/this/socket

Ah, I see now.

Still, yeah, I don't think we can change GDB like that.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list