backing out changes from

Bug 323853 - JB_BP not exported by newer glibc
per shaver, r=shaver
This commit is contained in:
timeless%mozdev.org 2006-02-03 19:35:14 +00:00
parent 82876b785e
commit 66f1b2ad42
3 changed files with 4 additions and 22 deletions

View File

@ -82,20 +82,9 @@ void DemangleSymbol(const char * aSymbol,
#endif // MOZ_DEMANGLE_SYMBOLS
}
#if defined(linux) // Linux
#if (__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 3)) // use glibc backtrace()
#include <execinfo.h>
void DumpStackToFile(FILE* aStream)
{
void *array[20];
size_t size;
fflush(aStream);
size = backtrace (array, 20);
backtrace_symbols_fd (array, size, fileno(aStream));
}
#if defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC)) // i386 or PPC Linux stackwalking code
#elif defined(__GLIBC__) && (defined(__i386) || defined(PPC)) // old style i386 or PPC Linux stackwalking code
#include <setjmp.h>
//
@ -151,13 +140,6 @@ void DumpStackToFile(FILE* aStream)
}
}
#else // not implemented
void DumpStackToFile(FILE* aStream)
{
fprintf(aStream, "Info: Stacktrace not implemented for this Linux platform\n");
}
#endif // Linux
#elif defined(__sun) && (defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386))
/*

View File

@ -828,8 +828,8 @@ nsTraceRefcntImpl::WalkTheStack(FILE* aStream)
}
// WIN32 x86 stack walking code
// Linux stackwalking code or Solaris
#elif (defined(linux) && defined(__GLIBC__)) || (defined(__sun) && (defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386)))
// i386 or PPC Linux stackwalking code or Solaris
#elif (defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC))) || (defined(__sun) && (defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386)))
#include "nsStackFrameUnix.h"
void
nsTraceRefcntImpl::WalkTheStack(FILE* aStream)

View File

@ -75,7 +75,7 @@
static char _progname[1024] = "huh?";
#if defined(LINUX) && defined(DEBUG) && defined(__GLIBC__)
#if defined(LINUX) && defined(DEBUG) && (defined(__i386) || defined(PPC))
#define CRAWL_STACK_ON_SIGSEGV
#endif