Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 82057 Details for
Bug 126037
firefox/thunderbird/gecko-sdk fail to build due to glibc-2.4 not exporting JB_BP
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for xpcom/base/nsStackFrameUnix.cpp and xpcom/base/nsTraceRefcntImpl.cpp
mozilla-1.7.12-dumpstack.patch (text/plain), 3.89 KB, created by
Alexandru Thomae
on 2006-03-13 16:12:45 UTC
(
hide
)
Description:
Patch for xpcom/base/nsStackFrameUnix.cpp and xpcom/base/nsTraceRefcntImpl.cpp
Filename:
MIME Type:
Creator:
Alexandru Thomae
Created:
2006-03-13 16:12:45 UTC
Size:
3.89 KB
patch
obsolete
>Index: xpcom/base/nsStackFrameUnix.cpp >=================================================================== >RCS file: /cvsroot/mozilla/xpcom/base/nsStackFrameUnix.cpp,v >retrieving revision 1.11 >diff -d -u -p -6 -r1.11 nsStackFrameUnix.cpp >--- xpcom/base/nsStackFrameUnix.cpp 8 Mar 2004 07:47:44 -0000 1.11 >+++ xpcom/base/nsStackFrameUnix.cpp 12 Feb 2006 16:11:45 -0000 >@@ -75,31 +75,21 @@ void DemangleSymbol(const char * aSymbol > free(demangled); > } > #endif // MOZ_DEMANGLE_SYMBOLS > } > > >-#if defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC)) // i386 or PPC Linux stackwalking code >+#if defined(linux) && defined(__GNUC__) && (defined(__i386) || defined(PPC)) // i386 or PPC Linux stackwalking code > >-#include <setjmp.h> >-// > > void DumpStackToFile(FILE* aStream) > { >- jmp_buf jb; >- setjmp(jb); >- > // Stack walking code courtesy Kipp's "leaky". > >- // Get the frame pointer out of the jmp_buf >- void **bp = (void**) >-#if defined(__i386) >- (jb[0].__jmpbuf[JB_BP]); >-#elif defined(PPC) >- (jb[0].__jmpbuf[JB_GPR1]); >-#endif >+ // Get the frame pointer >+ void **bp = (void**) __builtin_frame_address(0); > > int skip = 2; > for ( ; (void**)*bp > bp; bp = (void**)*bp) { > void *pc = *(bp+1); > if (--skip <= 0) { > Dl_info info; >Index: xpcom/base/nsTraceRefcntImpl.cpp >=================================================================== >RCS file: /cvsroot/mozilla/xpcom/base/nsTraceRefcntImpl.cpp,v >retrieving revision 1.93 >diff -d -u -p -6 -r1.93 nsTraceRefcntImpl.cpp >--- xpcom/base/nsTraceRefcntImpl.cpp 11 Feb 2004 07:16:10 -0000 1.93 >+++ xpcom/base/nsTraceRefcntImpl.cpp 12 Feb 2006 16:11:45 -0000 >@@ -47,25 +47,12 @@ > #include "nsCOMPtr.h" > #include "nsCRT.h" > #include <math.h> > > #if defined(_WIN32) > #include <windows.h> >-#elif defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC)) >-#include <setjmp.h> >- >-// >-// On glibc 2.1, the Dl_info api defined in <dlfcn.h> is only exposed >-// if __USE_GNU is defined. I suppose its some kind of standards >-// adherence thing. >-// >-#if (__GLIBC_MINOR__ >= 1) && !defined(__USE_GNU) >-#define __USE_GNU >-#endif >- >-#include <dlfcn.h> > #endif > > #ifdef HAVE_LIBDL > #include <dlfcn.h> > #endif > >@@ -481,13 +468,13 @@ static PRIntn PR_CALLBACK DumpSerialNumb > return HT_ENUMERATE_NEXT; > } > > > #endif /* NS_BUILD_REFCNT_LOGGING */ > >-nsresult >+NS_COM nsresult > nsTraceRefcntImpl::DumpStatistics(StatisticsType type, FILE* out) > { > nsresult rv = NS_OK; > #ifdef NS_BUILD_REFCNT_LOGGING > if (gBloatLog == nsnull || gBloatView == nsnull) { > return NS_ERROR_FAILURE; >@@ -558,13 +545,13 @@ done: > gLogging = wasLogging; > UNLOCK_TRACELOG(); > #endif > return rv; > } > >-void >+NS_COM void > nsTraceRefcntImpl::ResetStatistics() > { > #ifdef NS_BUILD_REFCNT_LOGGING > LOCK_TRACELOG(); > if (gBloatView) { > PL_HashTableDestroy(gBloatView); >@@ -847,23 +834,23 @@ static void InitTraceLog(void) > } > > #endif > > #if defined(_WIN32) && defined(_M_IX86) // WIN32 x86 stack walking code > #include "nsStackFrameWin.h" >-void >+NS_COM 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))) >+#elif (defined(linux) && defined(__GNUC__) && (defined(__i386) || defined(PPC))) || (defined(__sun) && (defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386))) > #include "nsStackFrameUnix.h" >-void >+NS_COM void > nsTraceRefcntImpl::WalkTheStack(FILE* aStream) > { > DumpStackToFile(aStream); > } > > #elif defined(XP_MAC) >@@ -957,13 +944,13 @@ nsTraceRefcntImpl::WalkTheStack(FILE* aS > break; > } > } > > #else // unsupported platform. > >-void >+NS_COM void > nsTraceRefcntImpl::WalkTheStack(FILE* aStream) > { > fprintf(aStream, "write me, dammit!\n"); > } > > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 126037
: 82057