* vax-tdep.c (INVALID_FLOAT, MAXLEN, NOPCODES): Don't define.
[deliverable/binutils-gdb.git] / gdb / maint.c
index 045510c5eae90f20e5e6d1642a334816b4490131..aa34239076582b5a57c422f12299a297d175ea92 100644 (file)
@@ -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);
@@ -494,7 +485,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));
@@ -642,6 +633,17 @@ maintenance_show_cmd (char *args, int from_tty)
 /* Profiling support.  */
 
 static int maintenance_profile_p;
+
+#if defined (HAVE_MONSTARTUP) && defined (HAVE__MCLEANUP)
+
+#ifdef HAVE__ETEXT
+extern char _etext;
+#define TEXTEND &_etext
+#else
+extern char etext;
+#define TEXTEND &etext
+#endif
+
 static int profiling_state;
 
 static void
@@ -666,7 +668,6 @@ maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *
       static int profiling_initialized;
 
       extern void monstartup (unsigned long, unsigned long);
-      extern char _etext;
       extern int main();
 
       if (!profiling_initialized)
@@ -677,7 +678,7 @@ maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *
 
       /* "main" is now always the first function in the text segment, so use
         its address for monstartup.  */
-      monstartup ((unsigned long) &main, (unsigned long) &_etext);
+      monstartup ((unsigned long) &main, (unsigned long) TEXTEND);
     }
   else
     {
@@ -685,6 +686,13 @@ maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *
       _mcleanup ();
     }
 }
+#else
+static void
+maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *c)
+{
+  error ("Profiling support is not available on this system.");
+}
+#endif
 
 void
 _initialize_maint_cmds (void)
@@ -802,6 +810,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.027682 seconds and 4 git commands to generate.