🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #2045

[patch] gdbserver usage message improvement

#2045
From: Martin Pool
Date: Tue, 14 May 2002 06:09
49 lines
2422 bytes
This small message 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
Technical Details
Message-ID: <20020514060945.GH21170@samba.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!howland.erols.net!feed2.news.rcn.net!rcn!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,5ce4b6cd6a713343,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 2002-05-14 01:14:43 PST
x-uunet-gateway: mr1.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Tue, 14 May 2002 08:14:38 GMT
Date: Tue, 14 May 2002 16:09:48 +1000
From: mbp@samba.org (Martin Pool)
Subject: [patch] gdbserver usage message improvement
Message-ID: <20020514060945.GH21170@samba.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.28i
X-GPG: 1024D/A0B3E88B: AFAC578F 1841EE6B FD95E143 3C63CA3F A0B3E88B
Approved: bug-gdb-request@mail.gnu.org
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!howland.erols.net!feed2.news.rcn.net!rcn!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb
Sender: bug-gdb-request@mail.gnu.org
Lines: 49