diff options
author | David Carlton <carlton@bactrian.org> | 2003-04-16 19:57:09 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-04-16 19:57:09 +0000 |
commit | 0bb428781c4782c6236beb58c06052dccd382aa1 (patch) | |
tree | c2745e3799c869e29769a81c22cc151fdbe84a97 /gdb/maint.c | |
parent | 8ddfa96fcd388fb183d7aac8befd08c138e105dd (diff) | |
download | gdb-0bb428781c4782c6236beb58c06052dccd382aa1.zip gdb-0bb428781c4782c6236beb58c06052dccd382aa1.tar.gz gdb-0bb428781c4782c6236beb58c06052dccd382aa1.tar.bz2 |
2003-04-16 David Carlton <carlton@bactrian.org>
* Merge with mainline; tag is carlton_dictionary-20030416-merge.
Diffstat (limited to 'gdb/maint.c')
-rw-r--r-- | gdb/maint.c | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/gdb/maint.c b/gdb/maint.c index f2dfa68..2eb59ee 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -151,17 +151,8 @@ maintenance_demangle (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); @@ -443,6 +434,18 @@ maintenance_print_command (char *arg, int from_tty) help_list (maintenanceprintlist, "maintenance print ", -1, gdb_stdout); } +/* The "maintenance list" command is defined as a prefix, with + allow_unknown 0. Therefore, its own definition is called only for + "maintenance list" with no args. */ + +/* ARGSUSED */ +static void +maintenance_list_command (char *arg, int from_tty) +{ + printf_unfiltered ("\"maintenance list\" must be followed by the name of a list command.\n"); + help_list (maintenancelistlist, "maintenance list ", -1, gdb_stdout); +} + /* The "maintenance translate-address" command converts a section and address to a symbol. This can be called in two ways: maintenance translate-address <secname> <addr> @@ -741,6 +744,11 @@ lists all sections from all object files, including shared libraries.", &maintenanceprintlist, "maintenance print ", 0, &maintenancelist); + add_prefix_cmd ("list", class_maintenance, maintenance_list_command, + "Maintenance command for listing GDB internal state.", + &maintenancelistlist, "maintenance list ", 0, + &maintenancelist); + add_prefix_cmd ("set", class_maintenance, maintenance_set_cmd, "\ Set GDB internal variables used by the GDB maintainer.\n\ Configure variables internal to GDB that aid in GDB's maintenance", @@ -819,6 +827,19 @@ If a SOURCE file is specified, dump only that file's partial symbols.", "Print dump of current object file definitions.", &maintenanceprintlist); + add_cmd ("symtabs", class_maintenance, maintenance_list_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.", + &maintenancelistlist); + + add_cmd ("psymtabs", class_maintenance, maintenance_list_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.", + &maintenancelistlist); + add_cmd ("statistics", class_maintenance, maintenance_print_statistics, "Print statistics about internal gdb state.", &maintenanceprintlist); |