From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24160 invoked by alias); 9 May 2002 00:11:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24151 invoked from network); 9 May 2002 00:11:17 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 9 May 2002 00:11:17 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 175bWe-0003J6-00; Wed, 08 May 2002 20:11:16 -0400 Date: Wed, 08 May 2002 17:11:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Remote UDP support Message-ID: <20020509001116.GA12143@nevyn.them.org> Mail-Followup-To: Michael Snyder , gdb-patches@sources.redhat.com References: <20020508232636.GA10279@nevyn.them.org> <3CD9B872.35CC1D23@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CD9B872.35CC1D23@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-05/txt/msg00249.txt.bz2 On Wed, May 08, 2002 at 04:44:50PM -0700, Michael Snyder wrote: > Daniel Jacobowitz wrote: > > > > A patch for this feature was supported a year or so ago, but never went in. > > I had a need for this a couple of days ago, so I did it over from scratch; > > it's much easier now than it was at the time. The name of ser-tcp.c is a > > bit wrong after this patch; I can either rename the file to ser-net.c or > > just update some comments to match. Got a preference? Otherwise OK? > > > > -- > > Daniel Jacobowitz Carnegie Mellon University > > MontaVista Software Debian GNU/Linux Developer > > Wow! I love the simplicity of the change. Nice job. I actually leave non-blocking connects enabled for UDP, because it kept the changes smaller. It's kind of silly, if you think about it, though :) > I'm not sure if I understand all the ramifications, though. > If you call net_open, how is it going to decide whether > to use udp or tcp? I imagine we would want it to use > tcp by preference, if possible. Ack, I forgot to include the accompanying documentation changes. Bad Dan! The gist is that you can say "host:port" or ":port" and get TCP, "udp:host:port" or "udp::port" and get UDP, or "tcp:host:port" or "tcp::port" and get TCP. So you can connect by TCP to a host named UDP, etc. Here's the matching documentation patch. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer 2002-05-08 Daniel Jacobowitz * gdb.texinfo (Debug Session): Document new `udp:' and `tcp:' options for `target remote'. Index: gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.98 diff -u -r1.98 gdb.texinfo --- gdb.texinfo 4 May 2002 16:00:30 -0000 1.98 +++ gdb.texinfo 9 May 2002 00:10:17 -0000 @@ -10485,7 +10485,8 @@ @cindex TCP port, @code{target remote} To use a TCP connection, use an argument of the form -@code{@var{host}:port}. For example, to connect to port 2828 on a +@code{@var{host}:@var{port}} or @code{tcp:@var{host}:@var{port}}. +For example, to connect to port 2828 on a terminal server named @code{manyfarms}: @smallexample @@ -10503,6 +10504,15 @@ @noindent Note that the colon is still required here. + +@cindex UDP port, @code{target remote} +To use a UDP connection, use an argument of the form +@code{udp:@var{host}:@var{port}}. For example, to connect to UDP port 2828 +on a terminal server named @code{manyfarms}: + +@smallexample +target remote udp:manyfarms:2828 +@end smallexample @end enumerate Now you can use all the usual commands to examine and change data and to