aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/server.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-05-16 02:33:04 +0000
committerDaniel Jacobowitz <drow@false.org>2002-05-16 02:33:04 +0000
commit0bc68c494873cdf0f93ecd47a5b9cd7067cf0f8b (patch)
tree93b67e22ad3d9bd4e0d096bbe4903d0861f9373a /gdb/gdbserver/server.c
parentabdb5c032d556bd330fe30d86693a86e194d97dc (diff)
downloadgdb-0bc68c494873cdf0f93ecd47a5b9cd7067cf0f8b.zip
gdb-0bc68c494873cdf0f93ecd47a5b9cd7067cf0f8b.tar.gz
gdb-0bc68c494873cdf0f93ecd47a5b9cd7067cf0f8b.tar.bz2
2002-05-15 Daniel Jacobowitz <drow@mvista.com>
From Martin Pool <mbp@samba.org>: * gdbserver/server.c (gdbserver_usage): New function. (main): Call it.
Diffstat (limited to 'gdb/gdbserver/server.c')
-rw-r--r--gdb/gdbserver/server.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index ba85b59..a31547c 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -75,6 +75,16 @@ handle_query (char *own_buf)
static int attached;
+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[])
{
@@ -110,8 +120,7 @@ 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 ();