You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+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"
#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>
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
}
}
+/* 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. */
"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);