aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-12-09 12:22:16 -0700
committerTom Tromey <tromey@adacore.com>2024-12-12 07:37:57 -0700
commit267749aeb02ae0bcd040d45cf4157462e571d96b (patch)
tree5ffa18ec83393ff45cbd3e93fb868247e9da146a
parent439334eba0dafe61a01b9b9404f0bbaa6e25c853 (diff)
downloadbinutils-267749aeb02ae0bcd040d45cf4157462e571d96b.zip
binutils-267749aeb02ae0bcd040d45cf4157462e571d96b.tar.gz
binutils-267749aeb02ae0bcd040d45cf4157462e571d96b.tar.bz2
Add text to gdbreplay --help output
I noticed that gdbreplay --help is rather sparse -- it doesn't even mention the names of the options it accepts. This patch updates the help output to be more complete. Approved-By: Andrew Burgess <aburgess@redhat.com>
-rw-r--r--gdbserver/gdbreplay.cc32
1 files changed, 29 insertions, 3 deletions
diff --git a/gdbserver/gdbreplay.cc b/gdbserver/gdbreplay.cc
index 951f50e..5c7821a 100644
--- a/gdbserver/gdbreplay.cc
+++ b/gdbserver/gdbreplay.cc
@@ -474,8 +474,29 @@ static void
gdbreplay_usage (FILE *stream)
{
fprintf (stream, "Usage:\tgdbreplay LOGFILE HOST:PORT\n");
- if (REPORT_BUGS_TO[0] && stream == stdout)
- fprintf (stream, "Report bugs to \"%s\".\n", REPORT_BUGS_TO);
+}
+
+static void
+gdbreplay_help ()
+{
+ gdbreplay_usage (stdout);
+
+ printf ("\n");
+ printf ("LOGFILE is a file generated by 'set remotelogfile' in gdb.\n");
+ printf ("COMM may either be a tty device (for serial debugging),\n");
+ printf ("HOST:PORT to listen for a TCP connection, or '-' or 'stdio' to use\n");
+ printf ("stdin/stdout of gdbserver.\n");
+ printf ("\n");
+
+ printf ("Options:\n\n");
+ printf (" --debug-logging Show packets as they are processed.\n");
+ printf (" --help Print this message and then exit.\n");
+ printf (" --version Display version information and then exit.\n");
+ if (REPORT_BUGS_TO[0])
+ {
+ printf ("\n");
+ printf ("Report bugs to \"%s\".\n", REPORT_BUGS_TO);
+ }
}
/* Main function. This is called by the real "main" function,
@@ -503,11 +524,16 @@ captured_main (int argc, char *argv[])
gdbreplay_version ();
exit (0);
case OPT_HELP:
- gdbreplay_usage (stdout);
+ gdbreplay_help ();
exit (0);
case OPT_LOGGING:
debug_logging = true;
break;
+
+ case '?':
+ fprintf (stderr,
+ "Use 'gdbreplay --help' for a complete list of options.\n");
+ exit (1);
}
}