зеркало из https://github.com/mozilla/pjs.git
defining DemangleSymbol on all 'nix platform - fixing bustage
This commit is contained in:
Родитель
2a77c1394e
Коммит
ef0b56d834
|
@ -51,10 +51,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC)) // i386 or PPC Linux stackwalking code
|
|
||||||
|
|
||||||
#include <setjmp.h>
|
|
||||||
//
|
|
||||||
// This thing is exported by libiberty.a (-liberty)
|
// This thing is exported by libiberty.a (-liberty)
|
||||||
// Yes, this is a gcc only hack
|
// Yes, this is a gcc only hack
|
||||||
#if defined(MOZ_DEMANGLE_SYMBOLS)
|
#if defined(MOZ_DEMANGLE_SYMBOLS)
|
||||||
|
@ -62,6 +59,7 @@ extern "C" char * cplus_demangle(const char *,int);
|
||||||
#include <stdlib.h> // for free()
|
#include <stdlib.h> // for free()
|
||||||
#endif // MOZ_DEMANGLE_SYMBOLS
|
#endif // MOZ_DEMANGLE_SYMBOLS
|
||||||
|
|
||||||
|
#if (defined(__linux__) || defined(__sun)) && defined(__GNUC__)
|
||||||
void DemangleSymbol(const char * aSymbol,
|
void DemangleSymbol(const char * aSymbol,
|
||||||
char * aBuffer,
|
char * aBuffer,
|
||||||
int aBufLen)
|
int aBufLen)
|
||||||
|
@ -80,6 +78,23 @@ void DemangleSymbol(const char * aSymbol,
|
||||||
#endif // MOZ_DEMANGLE_SYMBOLS
|
#endif // MOZ_DEMANGLE_SYMBOLS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#elif
|
||||||
|
void DemangleSymbol(const char * aSymbol,
|
||||||
|
char * aBuffer,
|
||||||
|
int aBufLen)
|
||||||
|
{
|
||||||
|
// lose
|
||||||
|
aBuffer[0] = '\0';
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC)) // i386 or PPC Linux stackwalking code
|
||||||
|
|
||||||
|
#include <setjmp.h>
|
||||||
|
//
|
||||||
|
|
||||||
void DumpStackToFile(FILE* aStream)
|
void DumpStackToFile(FILE* aStream)
|
||||||
{
|
{
|
||||||
jmp_buf jb;
|
jmp_buf jb;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче