* write.c (relax_segment <rs_space>): Calculate growth using
[deliverable/binutils-gdb.git] / gdb / minsyms.c
index 7608297a8e89791bafea25a9d80c7b9c4e1c3302..0ed38d2a33a2e8e63b63f35420a68879f70e2597 100644 (file)
@@ -47,6 +47,8 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "demangle.h"
+#include "value.h"
+#include "cp-abi.h"
 
 /* Accumulate the minimal symbols for each objfile in bunches of BUNCH_SIZE.
    At the end, copy them all into one newly allocated location on an objfile's
@@ -956,9 +958,24 @@ install_minimal_symbols (struct objfile *objfile)
       objfile->minimal_symbol_count = mcount;
       objfile->msymbols = msymbols;
 
+      /* Try to guess the appropriate C++ ABI by looking at the names 
+        of the minimal symbols in the table.  */
+      {
+       int i;
+
+       for (i = 0; i < mcount; i++)
+         {
+           const char *name = SYMBOL_NAME (&objfile->msymbols[i]);
+           if (name[0] == '_' && name[1] == 'Z')
+             {
+               switch_to_cp_abi ("gnu-v3");
+               break;
+             }
+         }
+      }
+      
       /* Now walk through all the minimal symbols, selecting the newly added
          ones and attempting to cache their C++ demangled names. */
-
       for (; mcount-- > 0; msymbols++)
        SYMBOL_INIT_DEMANGLED_NAME (msymbols, &objfile->symbol_obstack);
 
This page took 0.024065 seconds and 4 git commands to generate.