summaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorqiyao <qiyao>2012-12-20 00:58:13 +0000
committerqiyao <qiyao>2012-12-20 00:58:13 +0000
commita5b7cf43e298308ed4796690baee272a1fc96705 (patch)
tree5212f456f62ebf632736c4eec0c1035fcc9150d2 /gdb/psymtab.c
parent55506ac89776c2f639944a80bf6211cfa160616b (diff)
downloadgdb-a5b7cf43e298308ed4796690baee272a1fc96705.tar.gz
gdb/
2012-12-20 Yao Qi <yao@codesourcery.com> * maint.c (_initialize_maint_cmds): Move code to ... * psymtab.c (_initialize_psymtab): ... here. New. Include "gdbcmd.h". (maintenance_print_psymbols): Make it static. (maintenance_info_psymtabs, maintenance_check_symtabs): Likewise. * symtab.h (maintenance_print_psymbols): Remove declaration. (maintenance_check_symtabs, maintenance_info_psymtabs): Likewise.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 027ad38b8b0..2b4d9f936c5 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -35,6 +35,7 @@
#include "dictionary.h"
#include "language.h"
#include "cp-support.h"
+#include "gdbcmd.h"
#ifndef DEV_TTY
#define DEV_TTY "/dev/tty"
@@ -1815,7 +1816,7 @@ discard_psymtab (struct objfile *objfile, struct partial_symtab *pst)
-void
+static void
maintenance_print_psymbols (char *args, int from_tty)
{
char **argv;
@@ -1864,7 +1865,7 @@ print-psymbols takes an output file name and optional symbol file name"));
}
/* List all the partial symbol tables whose names match REGEXP (optional). */
-void
+static void
maintenance_info_psymtabs (char *regexp, int from_tty)
{
struct program_space *pspace;
@@ -1970,7 +1971,7 @@ maintenance_info_psymtabs (char *regexp, int from_tty)
/* Check consistency of psymtabs and symtabs. */
-void
+static void
maintenance_check_symtabs (char *ignore, int from_tty)
{
struct symbol *sym;
@@ -2083,3 +2084,25 @@ map_partial_symbol_filenames (symbol_filename_ftype *fun, void *data,
need_fullname);
}
}
+
+extern initialize_file_ftype _initialize_psymtab;
+
+void
+_initialize_psymtab (void)
+{
+ add_cmd ("psymbols", class_maintenance, maintenance_print_psymbols, _("\
+Print dump of current partial symbol definitions.\n\
+Entries in the partial symbol table are dumped to file OUTFILE.\n\
+If a SOURCE file is specified, dump only that file's partial symbols."),
+ &maintenanceprintlist);
+
+ 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 ("check-symtabs", class_maintenance, maintenance_check_symtabs,
+ _("Check consistency of psymtabs and symtabs."),
+ &maintenancelist);
+}