* stabsread.c (get_substring): Declare second arg as int.
[deliverable/binutils-gdb.git] / gdb / maint.c
index 952e8cccedc999e649a5128ece137a5a0e5f0b9b..312195cc2218870d5ffb909b7c0617058a290afd 100644 (file)
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 
-#if MAINTENANCE_CMDS   /* Entire file goes away if not including maint cmds */
+#if MAINTENANCE_CMDS   /* Entire rest of file goes away if not including maint cmds */
 
 #include <signal.h>
 #include "command.h"
@@ -32,6 +32,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "gdbcore.h"
 #include "expression.h" /* For language.h */
 #include "language.h"
+#include "symfile.h"
+#include "objfiles.h"
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -47,6 +49,14 @@ static void maintenance_time_display PARAMS ((char *, int));
 
 static void maintenance_space_display PARAMS ((char *, int));
 
+static void maintenance_info_command PARAMS ((char *, int));
+
+static void print_section_table PARAMS ((bfd *, asection *, PTR));
+
+static void maintenance_info_sections PARAMS ((char *, int));
+
+static void maintenance_print_command 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
@@ -243,6 +253,16 @@ maintenance_info_sections (arg, from_tty)
     }
 }
 
+/* ARGSUSED */
+void
+maintenance_print_statistics (args, from_tty)
+     char *args;
+     int from_tty;
+{
+  print_objfile_statistics ();
+  print_symbol_bcache_statistics ();
+}
+
 /* The "maintenance print" command is defined as a prefix, with allow_unknown
    0.  Therefore, its own definition is called only for "maintenance print"
    with no args.  */
@@ -339,6 +359,10 @@ If a SOURCE file is specified, dump only that file's partial symbols.",
           "Print dump of current object file definitions.",
           &maintenanceprintlist);
 
+  add_cmd ("statistics", class_maintenance, maintenance_print_statistics,
+          "Print statistics about internal gdb state.",
+          &maintenanceprintlist);
+
   add_cmd ("check-symtabs", class_maintenance, maintenance_check_symtabs,
           "Check consistency of psymtabs and symtabs.",
           &maintenancelist);
This page took 0.025308 seconds and 4 git commands to generate.