From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10324 invoked by alias); 16 May 2002 02:20:02 -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 10285 invoked from network); 16 May 2002 02:20:00 -0000 Received: from unknown (HELO palrel11.hp.com) (156.153.255.246) by sources.redhat.com with SMTP; 16 May 2002 02:20:00 -0000 Received: from hpausa5.aus.hp.com (hpausa5.aus.hp.com [15.23.66.135]) by palrel11.hp.com (Postfix) with ESMTP id EFD03600B2C for ; Wed, 15 May 2002 19:19:58 -0700 (PDT) Received: from anomic.aus.hp.com (nevada.aus.hp.com [15.30.165.16]) by hpausa5.aus.hp.com with ESMTP (8.8.6 (PHNE_14041)/8.7.3 SMKit7.01) id MAA16176 for ; Thu, 16 May 2002 12:19:57 +1000 (EST) Received: from mbp by anomic.aus.hp.com with local (Exim 3.35 #1 (Debian)) id 178AsW-0006t9-00 for ; Thu, 16 May 2002 10:20:28 +0800 Date: Wed, 15 May 2002 19:20:00 -0000 From: Martin Pool To: gdb-patches@sources.redhat.com Subject: [patch] gdbserver usage message improvement Message-ID: <20020516022026.GC26044@samba.org> Reply-To: gdb-patches@sources.redhat.com, mbp@samba.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-SW-Source: 2002-05/txt/msg00624.txt.bz2 [I previously sent this to bug-gdb, but it looks like the newsgroup is just full of spam, so I thought I'd resend it here.] This small patch brings gdbserver's usage message up to date with the manual, so that it indicates it can support TCP as well as serial connections. I remember being puzzled by this in the past, so I think it would make gdb more friendly to have the message correct. As far as I can see TCP is supported on all platforms where gdbserver builds. Thanks, -- Martin (please cc me on replies) cd /home/mbp/work/gdb/gdb-5.2/gdb/gdbserver/ diff -u -p /home/mbp/work/gdb/gdb-5.2/gdb/gdbserver/server.c.\~1\~ /home/mbp/work/gdb/gdb-5.2/gdb/gdbserver/server.c --- /home/mbp/work/gdb/gdb-5.2/gdb/gdbserver/server.c.~1~ Sat Mar 30 06:03:34 2002 +++ /home/mbp/work/gdb/gdb-5.2/gdb/gdbserver/server.c Tue May 14 16:03:47 2002 @@ -56,6 +56,16 @@ attach_inferior (int pid, char *statuspt extern int remote_debug; +static void +gdbserver_usage (void) +{ + error ("Usage:\tgdbserver COMM PROG [ARGS ...]\n" + "\tgdbserver COMM --attach PID\n" + "\n" + "COMM may either be a tty device (for serial debugging), or \n" + "HOST:PORT to listen for a TCP connection.\n"); +} + int main (int argc, char *argv[]) { @@ -89,8 +99,9 @@ main (int argc, char *argv[]) } if (argc < 3 || bad_attach) - error ("Usage:\tgdbserver tty prog [args ...]\n" - "\tgdbserver tty --attach pid"); + { + gdbserver_usage(); + } initialize_low (); Diff finished at Tue May 14 16:04:33