differentiate between Win32 x86 and NT Alpha for a few low level debug activities. From bob meader <bob@guiduck.com>

git-svn-id: svn://10.0.0.236/trunk@41012 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jband%netscape.com 1999-07-24 22:00:00 +00:00
parent c3af801eaa
commit c8367e70cd
4 changed files with 26 additions and 8 deletions

View File

@ -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

View File

@ -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 <stdio.h>
@ -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();

View File

@ -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 <stdio.h>
@ -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();

View File

@ -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