diff --git a/stepmania/src/archutils/Win32/mapconv.cpp b/stepmania/src/archutils/Win32/mapconv.cpp index 09d0325034..29a4a519c5 100644 --- a/stepmania/src/archutils/Win32/mapconv.cpp +++ b/stepmania/src/archutils/Win32/mapconv.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #define MAX_CNAMBUF (0x20000) #define MAX_FNAMBUF (0x200000) @@ -64,7 +65,36 @@ bool findline(const char *searchstr) { /////////////////////////////////////////////////////////////////////////// +/* dbghelp UnDecorateSymbolName() doesn't handle anonymous namespaces, + * which look like "?A0x30dd143a". Remove "@?A0x????????"; we don't + * want to see "::" in crash dump output, anyway. */ +void RemoveAnonymousNamespaces( char *p ) +{ + while( p = strstr( p, "@?A" ) ) + { + int skip = 0, i; + if( strlen(p) < 13 ) + break; + + for( i = 5; i < 13; ++i ) + if( !isxdigit(p[i]) ) + skip = 1; + if( p[3] != '0' || p[4] != 'x' ) + skip = 1; + if( skip ) + { + ++p; + continue; + } + + memmove( p, p+13, strlen(p+13)+1 ); + } + +} + void parsename(long rva, char *func_name) { + RemoveAnonymousNamespaces( func_name ); + fnamptr = strtack(fnamptr, func_name, fnambuf+MAX_FNAMBUF); if(!fnamptr) throw "Too many func names; increase MAX_FNAMBUF."; diff --git a/stepmania/src/archutils/Win32/mapconv.exe b/stepmania/src/archutils/Win32/mapconv.exe index 38be7b47f8..d00a3f8915 100644 Binary files a/stepmania/src/archutils/Win32/mapconv.exe and b/stepmania/src/archutils/Win32/mapconv.exe differ