aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorgdb-3.4 <gdb@fsf.org>1989-11-05 21:02:37 +0000
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:32 +0100
commit1c997a4ae86938343edb715efc3fc742c5f668fe (patch)
tree9e3c70728a3987732436b7fa4b4cfef433a0669a /gdb/main.c
parent4187119d59afd156703cfcbc6be287c5085f1867 (diff)
downloadgdb-1c997a4ae86938343edb715efc3fc742c5f668fe.zip
gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.gz
gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.bz2
gdb-3.4
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/main.c b/gdb/main.c
index ee923c4..12282d5 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -347,6 +347,36 @@ main (argc, argv, envp)
/* -t /def/ttyp1: use /dev/ttyp1 for inferior I/O. */
else if (!strcmp (arg, "-t") || !strcmp (arg, "-tty"))
tty_command (argv[i], 0);
+
+ /* -help: print a summary of command line switches. */
+ else if (!strcmp (arg, "-help"))
+ {
+ fputs ("\
+This is GDB, the GNU debugger. Use the command\n\
+ gdb [options] [executable [core-file]]\n\
+to enter the debugger.\n\
+\n\
+Options available are:\n\
+ -help Print this message.\n\
+ -quiet Do not print version number on startup.\n\
+ -fullname Output information used by emacs-GDB interface.\n\
+ -batch Exit after processing options.\n\
+ -nx Do not read .gdbinit file.\n\
+ -tty TTY Use TTY for input/output by the program being debugged.\n\
+ -cd DIR Change current directory to DIR.\n\
+ -directory DIR Search for source files in DIR.\n\
+ -command FILE Execute GDB commands from FILE.\n\
+ -symbols SYMFILE Read symbols from SYMFILE.\n\
+ -exec EXECFILE Use EXECFILE as the executable.\n\
+ -se FILE Use FILE as symbol file and executable file.\n\
+ -core COREFILE Analyze the core dump COREFILE.\n\
+\n\
+For more information, type \"help\" from within GDB, or consult the\n\
+GDB manual (available as on-line info or a printed manual).\n", stderr);
+ /* Exiting after printing this message seems like
+ the most useful thing to do. */
+ exit (0);
+ }
else
error ("Unknown command-line switch: \"%s\"\n", arg);
}