Bugzilla
Quick Search
Browse
Advanced Search
Reports
Documentation
New Account
Log In
or
Remember
Forgot Password
Mozilla Home
Privacy
Cookies
Legal
Attachment 208878 Details for
Bug 323853
Looking for saved searches? click on "Search Bugs" above.
[patch]
patch (complete)
dumpstack.patch (text/plain), 3.73 KB, created by
Wolfgang Rosenauer [:wolfiR]
(
hide
)
Description:
patch (complete)
Filename:
MIME Type:
Creator:
Wolfgang Rosenauer [:wolfiR]
Size:
3.73 KB
patch
obsolete
>Index: xpfe/bootstrap/nsSigHandlers.cpp >=================================================================== >RCS file: /cvsroot/mozilla/xpfe/bootstrap/nsSigHandlers.cpp,v >retrieving revision 1.42 >diff -u -p -8 -r1.42 nsSigHandlers.cpp >--- xpfe/bootstrap/nsSigHandlers.cpp 22 Dec 2005 17:57:13 -0000 1.42 >+++ xpfe/bootstrap/nsSigHandlers.cpp 18 Jan 2006 19:04:15 -0000 >@@ -70,17 +70,17 @@ > > #ifdef MOZ_WIDGET_PHOTON > #include <photon/PhProto.h> > #include <string.h> > #endif > > static char _progname[1024] = "huh?"; > >-#if defined(LINUX) && defined(DEBUG) && (defined(__i386) || defined(PPC)) >+#if defined(LINUX) && defined(DEBUG) > #define CRAWL_STACK_ON_SIGSEGV > #endif > > #ifdef MOZ_WIDGET_PHOTON > void abnormal_exit_handler(int signum) > { > /* Free any shared memory that has been allocated */ > PgShmemCleanup(); >Index: xpcom/base/nsTraceRefcntImpl.cpp >=================================================================== >RCS file: /cvsroot/mozilla/xpcom/base/nsTraceRefcntImpl.cpp,v >retrieving revision 1.96 >diff -u -p -8 -r1.96 nsTraceRefcntImpl.cpp >--- xpcom/base/nsTraceRefcntImpl.cpp 24 Jun 2005 00:24:41 -0000 1.96 >+++ xpcom/base/nsTraceRefcntImpl.cpp 18 Jan 2006 19:04:32 -0000 >@@ -823,18 +823,18 @@ static void InitTraceLog(void) > #include "nsStackFrameWin.h" > void > nsTraceRefcntImpl::WalkTheStack(FILE* aStream) > { > DumpStackToFile(aStream); > } > > // WIN32 x86 stack walking code >-// 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))) >+// Linux stackwalking code or Solaris >+#elif (defined(linux) && defined(__GLIBC__)) || (defined(__sun) && (defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386))) > #include "nsStackFrameUnix.h" > void > nsTraceRefcntImpl::WalkTheStack(FILE* aStream) > { > DumpStackToFile(aStream); > } > > #else // unsupported platform. >Index: xpcom/base/nsStackFrameUnix.cpp >=================================================================== >RCS file: /cvsroot/mozilla/xpcom/base/nsStackFrameUnix.cpp,v >retrieving revision 1.12 >diff -u -p -8 -r1.12 nsStackFrameUnix.cpp >--- xpcom/base/nsStackFrameUnix.cpp 18 Apr 2004 14:18:12 -0000 1.12 >+++ xpcom/base/nsStackFrameUnix.cpp 18 Jan 2006 19:04:56 -0000 >@@ -77,19 +77,30 @@ void DemangleSymbol(const char * aSymbol > if (demangled) > { > strncpy(aBuffer,demangled,aBufLen); > free(demangled); > } > #endif // MOZ_DEMANGLE_SYMBOLS > } > >+#if defined(linux) && defined(__GLIBC__) // 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; > >-#if defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC)) // i386 or PPC Linux stackwalking code >+ fflush(aStream); >+ size = backtrace (array, 20); >+ backtrace_symbols_fd (array, size, fileno(aStream)); >+} > >+#elif defined(__i386) || defined(PPC) // old style i386 or PPC Linux stackwalking code > #include <setjmp.h> > // > > void DumpStackToFile(FILE* aStream) > { > jmp_buf jb; > setjmp(jb); > >@@ -135,16 +146,23 @@ void DumpStackToFile(FILE* aStream) > > PRUint32 off = (char*)pc - (char*)info.dli_saddr; > fprintf(aStream, "%s+0x%08X [%s +0x%08X]\n", > symbol, off, info.dli_fname, foff); > } > } > } > >+#else // not implemented >+void DumpStackToFile(FILE* aStream) >+{ >+ fprintf(aStream, "Stacktrace not implemented for this platform\n"); >+} >+#endif // Linux >+ > #elif defined(__sun) && (defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386)) > > /* > * Stack walking code for Solaris courtesy of Bart Smaalder's "memtrak". > */ > > #include <synch.h> > #include <ucontext.h>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
benjamin
: review+
shaver
: superreview+
Actions:
View
|
Diff
|
Review
Attachments on
bug 323853
:
208843
|
208878
|
209335
|
210230
|
210815
|
210837
|
210915
|
211873
|
215509
|
215705