/* Support for GDB maintenance commands.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
+ 2002, 2003, 2004 Free Software Foundation, Inc.
+
Written by Fred Fish at Cygnus Support.
This file is part of GDB.
static void maintenance_info_command (char *, int);
-static void print_section_table (bfd *, asection *, void *);
-
static void maintenance_info_sections (char *, int);
static void maintenance_print_command (char *, int);
}
#ifndef _WIN32
-/* ARGSUSED */
static void
maintenance_dump_me (char *args, int from_tty)
{
}
else
{
- switch (current_language->la_language)
- {
- case language_objc:
- /* Commented out until ObjC handling is enabled. */
- /* demangled = objc_demangle (args); */
- /* break; */
- case language_cplus:
- default:
- demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
- break;
- }
+ demangled = language_demangle (current_language, args,
+ DMGL_ANSI | DMGL_PARAMS);
if (demangled != NULL)
{
printf_unfiltered ("%s\n", demangled);
allow_unknown 0. Therefore, its own definition is called only for
"maintenance info" with no args. */
-/* ARGSUSED */
static void
maintenance_info_command (char *arg, int from_tty)
{
}
}
-/* ARGSUSED */
static void
maintenance_info_sections (char *arg, int from_tty)
{
}
}
-/* ARGSUSED */
void
maintenance_print_statistics (char *args, int from_tty)
{
print_symbol_bcache_statistics ();
}
-void
+static void
maintenance_print_architecture (char *args, int from_tty)
{
if (args == NULL)
allow_unknown 0. Therefore, its own definition is called only for
"maintenance print" with no args. */
-/* ARGSUSED */
static void
maintenance_print_command (char *arg, int from_tty)
{
if (sym)
printf_filtered ("%s+%s\n",
- SYMBOL_SOURCE_NAME (sym),
+ SYMBOL_PRINT_NAME (sym),
paddr_u (address - SYMBOL_VALUE_ADDRESS (sym)));
else if (sect)
printf_filtered ("no symbol at %s:0x%s\n", sect->name, paddr (address));
#if defined (HAVE_MONSTARTUP) && defined (HAVE__MCLEANUP)
+#ifdef HAVE__ETEXT
+extern char _etext;
+#define TEXTEND &_etext
+#else
+extern char etext;
+#define TEXTEND &etext
+#endif
+
static int profiling_state;
static void
static int profiling_initialized;
extern void monstartup (unsigned long, unsigned long);
- extern char _etext;
extern int main();
if (!profiling_initialized)
/* "main" is now always the first function in the text segment, so use
its address for monstartup. */
- monstartup ((unsigned long) &main, (unsigned long) &_etext);
+ monstartup ((unsigned long) &main, (unsigned long) TEXTEND);
}
else
{
static void
maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *c)
{
- warning ("Profiling support is not available on this system.");
+ error ("Profiling support is not available on this system.");
}
#endif
"Print dump of current object file definitions.",
&maintenanceprintlist);
+ add_cmd ("symtabs", class_maintenance, maintenance_info_symtabs,
+ "List the full symbol tables for all object files.\n\
+This does not include information about individual symbols, blocks, or\n\
+linetables --- just the symbol table structures themselves.\n\
+With an argument REGEXP, list the symbol tables whose names that match that.",
+ &maintenanceinfolist);
+
+ add_cmd ("psymtabs", class_maintenance, maintenance_info_psymtabs,
+ "List the partial symbol tables for all object files.\n\
+This does not include information about individual partial symbols,\n\
+just the symbol table structures themselves.",
+ &maintenanceinfolist);
+
add_cmd ("statistics", class_maintenance, maintenance_print_statistics,
"Print statistics about internal gdb state.",
&maintenanceprintlist);
If you decide you want to use it: maintenance undeprecate 'commandname'",
&maintenancelist);
- add_show_from_set (
- add_set_cmd ("watchdog", class_maintenance, var_zinteger, (char *) &watchdog,
- "Set watchdog timer.\n\
-When non-zero, this timeout is used instead of waiting forever for a target to\n\
-finish a low-level step or continue operation. If the specified amount of time\n\
-passes without a response from the target, an error occurs.", &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("watchdog", class_maintenance, var_zinteger,
+ (char *) &watchdog,
+ "Set watchdog timer.\n\
+When non-zero, this timeout is used instead of waiting forever for a target\n\
+to finish a low-level step or continue operation. If the specified amount\n\
+of time passes without a response from the target, an error occurs.",
+ &setlist),
+ &showlist);
add_setshow_boolean_cmd ("profile", class_maintenance,
- &maintenance_profile_p,
- "Set internal profiling.\n"
- "When enabled GDB is profiled.",
- "Show internal profiling.\n",
+ &maintenance_profile_p, "\
+Set internal profiling.", "\
+Show internal profiling.", "\
+When enabled GDB is profiled.", "\
+Internal profiling is %s.",
maintenance_set_profile_cmd, NULL,
&maintenance_set_cmdlist,
&maintenance_show_cmdlist);