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,
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);
}
}