* gas/mips/macro-warn-[1234].[sdl]: New tests.
[deliverable/binutils-gdb.git] / gdb / maint.c
index 7bdb1020530953d2ad0eb1645166070c138cd832..f105afa601d58268d02beb549f889146c8ca3f3f 100644 (file)
@@ -1,6 +1,8 @@
 /* Support for GDB maintenance commands.
-   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003
-   Free Software Foundation, Inc.
+
+   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
+   2002, 2003, 2004 Free Software Foundation, Inc.
+
    Written by Fred Fish at Cygnus Support.
 
    This file is part of GDB.
@@ -54,8 +56,6 @@ static void maintenance_space_display (char *, int);
 
 static void maintenance_info_command (char *, int);
 
-static void print_section_table (bfd *, asection *, void *);
-
 static void maintenance_info_sections (char *, int);
 
 static void maintenance_print_command (char *, int);
@@ -92,7 +92,6 @@ maintenance_command (char *args, int from_tty)
 }
 
 #ifndef _WIN32
-/* ARGSUSED */
 static void
 maintenance_dump_me (char *args, int from_tty)
 {
@@ -151,17 +150,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);
@@ -200,7 +190,6 @@ maintenance_space_display (char *args, int from_tty)
    allow_unknown 0.  Therefore, its own definition is called only for
    "maintenance info" with no args.  */
 
-/* ARGSUSED */
 static void
 maintenance_info_command (char *arg, int from_tty)
 {
@@ -362,7 +351,6 @@ print_objfile_section_info (bfd *abfd,
     }
 }
 
-/* ARGSUSED */
 static void
 maintenance_info_sections (char *arg, int from_tty)
 {
@@ -408,7 +396,6 @@ maintenance_info_sections (char *arg, int from_tty)
     }
 }
 
-/* ARGSUSED */
 void
 maintenance_print_statistics (char *args, int from_tty)
 {
@@ -416,7 +403,7 @@ maintenance_print_statistics (char *args, int from_tty)
   print_symbol_bcache_statistics ();
 }
 
-void
+static void
 maintenance_print_architecture (char *args, int from_tty)
 {
   if (args == NULL)
@@ -435,7 +422,6 @@ maintenance_print_architecture (char *args, int from_tty)
    allow_unknown 0.  Therefore, its own definition is called only for
    "maintenance print" with no args.  */
 
-/* ARGSUSED */
 static void
 maintenance_print_command (char *arg, int from_tty)
 {
@@ -494,7 +480,7 @@ maintenance_translate_address (char *arg, int from_tty)
 
   if (sym)
     printf_filtered ("%s+%s\n",
-                    SYMBOL_SOURCE_NAME (sym),
+                    SYMBOL_PRINT_NAME (sym),
                     paddr_u (address - SYMBOL_VALUE_ADDRESS (sym)));
   else if (sect)
     printf_filtered ("no symbol at %s:0x%s\n", sect->name, paddr (address));
@@ -819,6 +805,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_info_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.",
+          &maintenanceinfolist);
+
+  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 ("statistics", class_maintenance, maintenance_print_statistics,
           "Print statistics about internal gdb state.",
           &maintenanceprintlist);
This page took 0.02541 seconds and 4 git commands to generate.