#include "aout/stab_gnu.h"
#ifndef DIR_SEPARATOR
+#ifdef _WIN32
+#define DIR_SEPARATOR '\\'
+#else
#define DIR_SEPARATOR '/'
#endif
+#endif
/* The number of predefined XCOFF types. */
else if (n3 == 0xffffffff)
return debug_make_int_type (dhandle, 4, true);
#ifdef BFD64
- else if (n3 == (((bfd_vma) 0xffffffff) << 32) | 0xffffffff)
+ else if (n3 == ((((bfd_vma) 0xffffffff) << 32) | 0xffffffff))
return debug_make_int_type (dhandle, 8, true);
#endif
}
else if (n3 == 0x7fffffff)
return debug_make_int_type (dhandle, 4, false);
#ifdef BFD64
- else if (n3 == (((bfd_vma) 0x7fffffff) << 32) | 0xffffffff)
+ else if (n3 == ((((bfd_vma) 0x7fffffff) << 32) | 0xffffffff))
return debug_make_int_type (dhandle, 8, false);
#endif
}
if (pname != NULL)
{
char *s1, *s2, *s3, *s4;
+ char *from, *to;
s1 = savestring (orig, *pp - orig);
return false;
}
- *pname = savestring (s3, s4 - s3);
+ /* Eliminating all spaces, except those between > characters,
+ makes it more likely that the demangled name will match the
+ name which g++ used as the structure name. */
+ for (from = to = s3; from != s4; ++from)
+ if (*from != ' '
+ || (from[1] == '>' && from > s3 && from[-1] == '>'))
+ *to++ = *from;
+
+ *pname = savestring (s3, to - s3);
free (s3);
}