Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Philippe.Waille@imag.fr (Philippe Waille)
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb@sourceware.org, Philippe Waille <Philippe.Waille@imag.fr>
Subject: Re: About remote target AF_UNIX socket addition ?
Date: Fri, 27 Mar 2009 19:51:00 -0000	[thread overview]
Message-ID: <20090327193901.GA6735@navajo.imag.fr> (raw)
In-Reply-To: <200903271457.02867.pedro@codesourcery.com>

On Fri, Mar 27, 2009 at 02:57:02PM +0000, Pedro Alves wrote:
> >   The target command allows remote stub access through TCP sockets.
> >   Could it be extended to local unix domain (AF_UNIX) sockets as well ?
> > 
> >   gdb> target remote | some_stub_target                  /* existing  */
> >   gdb> target remote tcp:host:ip_port_number             /* existing  */
> >   gdb> target remote unix:local_filesystem_port_name     /* suggested */
> > 
> I'm not objecting, but, my knee jerk reaction would be to implement a
> netcat/socat-like stub that does stdio <-> unix socket forwarding, so
> you'd use:
> 
>  target remote | mypipe_to_socket_gateway

Outside gdb = end user pipe-to-socket-stub : 

a) each gdb user with the same problem will design again a stub
b) multiplex two unidirectionnal streams on a bidirectional socket 
c) carefully manage pipe/socket closing
--> not so simple code (I expect poll/select or multithread)


Inside gdb : 

I expect a small gdb patch (net_open function in ser-tcp.c and command
line option documentation) :

a) detect a new af_unix port name prefix string
b) fill/pass a sockaddr_un (instead of sockaddr_in) parameter to connect 
--> after connect, reuse the existing tcp code 
--> #ifdef "AF_UNIX/AF_LOCAL missing on WINDOWS" 

Best regards
Ph. W.

-- 
-----------------------------------------------------------------------------
Philippe WAILLE                            email :    Philippe.Waille@imag.fr
IMAG ID (Informatique et distribution)       Tel :    04 76 61 20 13
ENSIMAG - antenne de Montbonnot          Foreign :  33 4 76 61 20 13
INOVALLEE					     Fax :    04 76 61 20 99
51, avenue Jean Kuntzmann
38330 MONTBONNOT SAINT MARTIN


  reply	other threads:[~2009-03-27 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27 14:46 Philippe Waille
2009-03-27 14:57 ` Pedro Alves
2009-03-27 19:51   ` Philippe Waille [this message]
2009-03-27 20:01     ` Pedro Alves

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=20090327193901.GA6735@navajo.imag.fr \
    --to=philippe.waille@imag.fr \
    --cc=gdb@sourceware.org \
    --cc=pedro@codesourcery.com \
    /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