* minsyms.c (install_minimal_symbols): Only switch to gnu-v3 mode
authorDaniel Jacobowitz <drow@false.org>
Sun, 13 Apr 2003 15:25:23 +0000 (15:25 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sun, 13 Apr 2003 15:25:23 +0000 (15:25 +0000)
if the linkage name demangled successfully.

gdb/ChangeLog
gdb/minsyms.c

index 6cb324a6b41a8742146db65c3783b1489731591a..7d6f504e4be5adf2911bb9cf39c4d7482108d320 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-13  Daniel Jacobowitz  <drow@mvista.com>
+
+       * minsyms.c (install_minimal_symbols): Only switch to gnu-v3 mode
+       if the linkage name demangled successfully.
+
 2003-04-13  Mark Kettenis  <kettenis@gnu.org>
 
        * x86-64-tdep.c (att_flavour, intel_flavour, valid_flavours,
index d8569ff2aff4c14136ec69fc44b9fbd386f32d98..1f6cb3888006814cca6188235c4d3a547baad8ee 100644 (file)
@@ -920,8 +920,14 @@ install_minimal_symbols (struct objfile *objfile)
 
        for (i = 0; i < mcount; i++)
          {
+           /* If a symbol's name starts with _Z and was successfully
+              demangled, then we can assume we've found a GNU v3 symbol.
+              For now we set the C++ ABI globally; if the user is
+              mixing ABIs then the user will need to "set cp-abi"
+              manually.  */
            const char *name = SYMBOL_LINKAGE_NAME (&objfile->msymbols[i]);
-           if (name[0] == '_' && name[1] == 'Z')
+           if (name[0] == '_' && name[1] == 'Z'
+               && SYMBOL_DEMANGLED_NAME (&objfile->msymbols[i]) != NULL)
              {
                set_cp_abi_as_auto_default ("gnu-v3");
                break;