diff options
author | gdb-3.4 <gdb@fsf.org> | 1989-11-05 21:02:37 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-06-03 15:36:32 +0100 |
commit | 1c997a4ae86938343edb715efc3fc742c5f668fe (patch) | |
tree | 9e3c70728a3987732436b7fa4b4cfef433a0669a /gdb/main.c | |
parent | 4187119d59afd156703cfcbc6be287c5085f1867 (diff) | |
download | gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.zip gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.gz gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.bz2 |
gdb-3.4
Diffstat (limited to 'gdb/main.c')
-rw-r--r-- | gdb/main.c | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -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); } |