1 /* Support for GDB maintenance commands.
2 Copyright (C) 1992 Free Software Foundation, Inc.
3 Written by Fred Fish at Cygnus Support.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
24 #if MAINTENANCE_CMDS /* Entire file goes away if not including maint cmds */
33 maintenance_command PARAMS ((char *, int));
36 maintenance_dump_me PARAMS ((char *, int));
42 maintenance_command -- access the maintenance subcommands
46 void maintenance_command (char *args, int from_tty)
53 maintenance_command (args, from_tty)
57 error ("Unimplemented maintenance command '%s'", args);
63 maintenance_dump_me (args, from_tty)
67 if (query ("Should GDB dump core? "))
69 signal (SIGQUIT, SIG_DFL);
70 kill (getpid (), SIGQUIT);
74 /* The "maintenance info" command is defined as a prefix, with allow_unknown 0.
75 Therefore, its own definition is called only for "maintenance info" with
80 maintenance_info_command (arg, from_tty)
84 printf ("\"maintenance info\" must be followed by the name of an info command.\n");
85 help_list (maintenanceinfolist, "maintenance info ", -1, stdout);
92 _initialize_maint_cmds -- initialize the process file system stuff
96 void _initialize_maint_cmds (void)
100 Do required initializations during gdb startup for using the
101 /proc file system interface.
107 _initialize_maint_cmds ()
109 add_prefix_cmd ("maintenance", class_maintenance, maintenance_command,
110 "Commands for use by GDB maintainers.\n\
111 Includes commands to dump specific internal GDB structures in\n\
112 a human readable form, including dumping of symbol tables, type\n\
114 &maintenancelist, "maintenance ", 1,
117 add_prefix_cmd ("info", class_info, maintenance_info_command,
118 "Maintenance command for showing things about the program being debugged.",
119 &maintenanceinfolist, "maintenance info ", 1,
122 add_cmd ("dump-me", class_maintenance, maintenance_dump_me,
123 "Get fatal error; make debugger dump its core.\n\
124 GDB sets it's handling of SIGQUIT back to SIG_DFL and then sends\n\
125 itself a SIGQUIT signal.",
128 add_cmd ("print-type", class_maintenance, maintenance_print_type,
129 "Print a type chain for a given symbol.\n\
130 For each node in a type chain, print the raw data for each member of\n\
131 the type structure, and the interpretation of the data.",
134 add_cmd ("print-symbols", class_maintenance, maintenance_print_symbols,
135 "Print dump of current symbol definitions.\n\
136 Entries in the full symbol table are dumped to file OUTFILE.\n\
137 If a SOURCE file is specified, dump only that file's symbols.",
140 add_cmd ("print-msymbols", class_maintenance, maintenance_print_msymbols,
141 "Print dump of current minimal symbol definitions.\n\
142 Entries in the minimal symbol table are dumped to file OUTFILE.\n\
143 If a SOURCE file is specified, dump only that file's minimal symbols.",
146 add_cmd ("print-psymbols", class_maintenance, maintenance_print_psymbols,
147 "Print dump of current partial symbol definitions.\n\
148 Entries in the partial symbol table are dumped to file OUTFILE.\n\
149 If a SOURCE file is specified, dump only that file's partial symbols.",
152 add_cmd ("print-objfiles", class_maintenance, maintenance_print_objfiles,
153 "Print dump of current object file definitions.",
158 #endif /* MAINTENANCE_CMDS */