diff --git a/mozilla/xpcom/base/nsDebug.cpp b/mozilla/xpcom/base/nsDebug.cpp index 17dfa34979d..2c43daf40bd 100644 --- a/mozilla/xpcom/base/nsDebug.cpp +++ b/mozilla/xpcom/base/nsDebug.cpp @@ -95,8 +95,13 @@ NS_COM void nsDebug::Abort(const char* aFile, PRIntn aLine) ("Abort: at file %s, line %d", aFile, aLine)); PR_LogFlush(); #if defined(_WIN32) +#ifdef _M_IX86 long* __p = (long*) 0x7; *__p = 0x7; +#else /* _M_ALPHA */ + fprintf(stderr, "\07 Abort\n"); fflush(stderr); + PR_Abort(); +#endif #elif defined(XP_MAC) ExitToShell(); #elif defined(XP_UNIX) @@ -118,7 +123,11 @@ NS_COM void nsDebug::Break(const char* aFile, PRIntn aLine) ("Break: at file %s, line %d", aFile, aLine)); PR_LogFlush(); #if defined(_WIN32) - ::DebugBreak(); +#ifdef _M_IX86 + ::DebugBreak(); +#else /* _M_ALPHA */ + fprintf(stderr, "Break: at file %s\n",aFile, aLine); fflush(stderr); +#endif #elif defined(XP_UNIX) && !defined(UNIX_CRASH_ON_ASSERT) fprintf(stderr, "\07"); fflush(stderr); #elif defined(XP_BEOS) @@ -160,7 +169,7 @@ NS_COM void nsDebug::Assertion(const char* aStr, const char* aExpr, PR_LOG(gDebugLog, PR_LOG_ERROR, ("Assertion: \"%s\" (%s) at file %s, line %d", aStr, aExpr, aFile, aLine)); -#if defined(XP_UNIX) +#if defined(XP_UNIX) || (defined(_M_ALPHA) && defined(_WIN32)) fprintf(stderr, "Assertion: \"%s\" (%s) at file %s, line %d\n", aStr, aExpr, aFile, aLine); #endif diff --git a/mozilla/xpcom/base/nsTraceRefcnt.cpp b/mozilla/xpcom/base/nsTraceRefcnt.cpp index 2dea57ab2fc..b8f90425351 100644 --- a/mozilla/xpcom/base/nsTraceRefcnt.cpp +++ b/mozilla/xpcom/base/nsTraceRefcnt.cpp @@ -87,7 +87,7 @@ int nsIToA16(PRUint32 aNumber, char* aBuffer) return count; } -#if defined(_WIN32) // WIN32 stack walking code +#if defined(_WIN32) && defined(_M_IX86) // WIN32 x86 stack walking code #include "imagehlp.h" #include @@ -343,7 +343,7 @@ nsTraceRefcnt::LoadLibrarySymbols(const char* aLibraryName, void* aLibrayHandle) { #ifdef MOZ_TRACE_XPCOM_REFCNT -#if defined(_WIN32) +#if defined(_WIN32) && defined(_M_IX86) /* Win32 x86 only */ InitTraceLog(); if (PR_LOG_TEST(gTraceRefcntLog,PR_LOG_DEBUG)) { HANDLE myProcess = ::GetCurrentProcess(); diff --git a/mozilla/xpcom/base/nsTraceRefcntImpl.cpp b/mozilla/xpcom/base/nsTraceRefcntImpl.cpp index 2dea57ab2fc..b8f90425351 100644 --- a/mozilla/xpcom/base/nsTraceRefcntImpl.cpp +++ b/mozilla/xpcom/base/nsTraceRefcntImpl.cpp @@ -87,7 +87,7 @@ int nsIToA16(PRUint32 aNumber, char* aBuffer) return count; } -#if defined(_WIN32) // WIN32 stack walking code +#if defined(_WIN32) && defined(_M_IX86) // WIN32 x86 stack walking code #include "imagehlp.h" #include @@ -343,7 +343,7 @@ nsTraceRefcnt::LoadLibrarySymbols(const char* aLibraryName, void* aLibrayHandle) { #ifdef MOZ_TRACE_XPCOM_REFCNT -#if defined(_WIN32) +#if defined(_WIN32) && defined(_M_IX86) /* Win32 x86 only */ InitTraceLog(); if (PR_LOG_TEST(gTraceRefcntLog,PR_LOG_DEBUG)) { HANDLE myProcess = ::GetCurrentProcess(); diff --git a/mozilla/xpcom/glue/nsDebug.cpp b/mozilla/xpcom/glue/nsDebug.cpp index 17dfa34979d..2c43daf40bd 100644 --- a/mozilla/xpcom/glue/nsDebug.cpp +++ b/mozilla/xpcom/glue/nsDebug.cpp @@ -95,8 +95,13 @@ NS_COM void nsDebug::Abort(const char* aFile, PRIntn aLine) ("Abort: at file %s, line %d", aFile, aLine)); PR_LogFlush(); #if defined(_WIN32) +#ifdef _M_IX86 long* __p = (long*) 0x7; *__p = 0x7; +#else /* _M_ALPHA */ + fprintf(stderr, "\07 Abort\n"); fflush(stderr); + PR_Abort(); +#endif #elif defined(XP_MAC) ExitToShell(); #elif defined(XP_UNIX) @@ -118,7 +123,11 @@ NS_COM void nsDebug::Break(const char* aFile, PRIntn aLine) ("Break: at file %s, line %d", aFile, aLine)); PR_LogFlush(); #if defined(_WIN32) - ::DebugBreak(); +#ifdef _M_IX86 + ::DebugBreak(); +#else /* _M_ALPHA */ + fprintf(stderr, "Break: at file %s\n",aFile, aLine); fflush(stderr); +#endif #elif defined(XP_UNIX) && !defined(UNIX_CRASH_ON_ASSERT) fprintf(stderr, "\07"); fflush(stderr); #elif defined(XP_BEOS) @@ -160,7 +169,7 @@ NS_COM void nsDebug::Assertion(const char* aStr, const char* aExpr, PR_LOG(gDebugLog, PR_LOG_ERROR, ("Assertion: \"%s\" (%s) at file %s, line %d", aStr, aExpr, aFile, aLine)); -#if defined(XP_UNIX) +#if defined(XP_UNIX) || (defined(_M_ALPHA) && defined(_WIN32)) fprintf(stderr, "Assertion: \"%s\" (%s) at file %s, line %d\n", aStr, aExpr, aFile, aLine); #endif