From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8473 invoked by alias); 27 Mar 2009 19:51:12 -0000 Received: (qmail 8463 invoked by uid 22791); 27 Mar 2009 19:51:11 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from imag.imag.fr (HELO imag.imag.fr) (129.88.30.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Mar 2009 19:51:04 +0000 Received: from navajo.imag.fr (navajo.imag.fr [129.88.69.1]) by imag.imag.fr (8.13.8/8.13.8) with ESMTP id n2RJjuwo024677; Fri, 27 Mar 2009 20:45:56 +0100 (CET) Received: by navajo.imag.fr (Postfix, from userid 23010) id 60049FE83; Fri, 27 Mar 2009 20:39:01 +0100 (CET) Date: Fri, 27 Mar 2009 19:51:00 -0000 To: Pedro Alves Cc: gdb@sourceware.org, Philippe Waille Subject: Re: About remote target AF_UNIX socket addition ? Message-ID: <20090327193901.GA6735@navajo.imag.fr> References: <20090327143915.GA18690@otto.imag.fr> <200903271457.02867.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200903271457.02867.pedro@codesourcery.com> User-Agent: Mutt/1.5.13 (2006-08-11) From: Philippe.Waille@imag.fr (Philippe Waille) X-IMAG-MailScanner-Information: Please contact MI2S MIM for more information X-IMAG-MailScanner: Found to be clean X-IMAG-MailScanner-SpamCheck: X-IMAG-MailScanner-From: philippe.waille@imag.fr X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00183.txt.bz2 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