* gdb.base/Makefile.in (clean): Remove callf-info.exp.
[deliverable/binutils-gdb.git] / gdb / maint.c
index 378ac0aaeb57b0b81ca5e2cf5b213cc434542979..7f822ecfd9c8163ab18ddfacfa4165d556e6811f 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for GDB maintenance commands.
-   Copyright (C) 1992 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1994 Free Software Foundation, Inc.
    Written by Fred Fish at Cygnus Support.
 
 This file is part of GDB.
@@ -33,14 +33,23 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "expression.h" /* For language.h */
 #include "language.h"
 
-static void
-maintenance_command PARAMS ((char *, int));
+static void maintenance_command PARAMS ((char *, int));
 
-static void
-maintenance_dump_me PARAMS ((char *, int));
+static void maintenance_dump_me PARAMS ((char *, int));
 
-static void
-maintenance_demangle PARAMS ((char *, int));
+static void maintenance_demangle PARAMS ((char *, int));
+
+static void maintenance_time_display PARAMS ((char *, int));
+
+static void maintenance_space_display PARAMS ((char *, int));
+
+/* Set this to the maximum number of seconds to wait instead of waiting forever
+   in target_wait().  If this timer times out, then it generates an error and
+   the command is aborted.  This replaces most of the need for timeouts in the
+   GDB test suite, and makes it possible to distinguish between a hung target
+   and one with slow communications.  */
+
+int watchdog = 0;
 
 /*
 
@@ -113,6 +122,32 @@ maintenance_demangle (args, from_tty)
     }
 }
 
+static void
+maintenance_time_display (args, from_tty)
+     char *args;
+     int from_tty;
+{
+  extern int display_time;
+
+  if (args == NULL || *args == '\0')
+    printf_unfiltered ("\"maintenance time\" takes a numeric argument.\n");
+  else
+    display_time = strtol (args, NULL, 10);
+}
+
+static void
+maintenance_space_display (args, from_tty)
+     char *args;
+     int from_tty;
+{
+  extern int display_space;
+
+  if (args == NULL || *args == '\0')
+    printf_unfiltered ("\"maintenance space\" takes a numeric argument.\n");
+  else
+    display_space = strtol (args, NULL, 10);
+}
+
 /* The "maintenance info" command is defined as a prefix, with allow_unknown 0.
    Therefore, its own definition is called only for "maintenance info" with
    no args.  */
@@ -171,8 +206,8 @@ print_section_table (abfd, asect, ignore)
     printf_filtered (" HAS_CONTENTS");
   if (flags & SEC_NEVER_LOAD)
     printf_filtered (" NEVER_LOAD");
-  if (flags & SEC_SHARED_LIBRARY)
-    printf_filtered (" SHARED_LIBRARY");
+  if (flags & SEC_COFF_SHARED_LIBRARY)
+    printf_filtered (" COFF_SHARED_LIBRARY");
   if (flags & SEC_IS_COMMON)
     printf_filtered (" IS_COMMON");
 
@@ -260,6 +295,18 @@ Call internal GDB demangler routine to demangle a C++ link name\n\
 and prints the result.",
           &maintenancelist);
 
+  add_cmd ("time", class_maintenance, maintenance_time_display,
+          "Set the display of time usage.\n\
+If nonzero, will cause the execution time for each command to be\n\
+displayed, following the command's output.",
+          &maintenancelist);
+
+  add_cmd ("space", class_maintenance, maintenance_space_display,
+          "Set the display of space usage.\n\
+If nonzero, will cause the execution space for each command to be\n\
+displayed, following the command's output.",
+          &maintenancelist);
+
   add_cmd ("type", class_maintenance, maintenance_print_type,
           "Print a type chain for a given symbol.\n\
 For each node in a type chain, print the raw data for each member of\n\
@@ -287,5 +334,17 @@ If a SOURCE file is specified, dump only that file's partial symbols.",
   add_cmd ("objfiles", class_maintenance, maintenance_print_objfiles,
           "Print dump of current object file definitions.",
           &maintenanceprintlist);
+
+  add_cmd ("check-symtabs", class_maintenance, maintenance_check_symtabs,
+          "Check consistency of psymtabs and symtabs.",
+          &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);
 #endif /* MAINTENANCE_CMDS */
 }
This page took 0.024726 seconds and 4 git commands to generate.