From 51cd8132db1a973c563fbdc77abf23f4c479c41a Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Fri, 2 Jun 2006 20:06:43 +0000 Subject: [PATCH] Make Mac OS X debug trap impl use raise(SIGTRAP) instead of Mac OS X debugging function so we're only required to set the XPCOM debug env variable and not also the Mac OS X debug break variable. Also make GNUC/x86 test more robust, include '__i386__' in the test because not all platforms define '__i386' (Mac OS X is one of those, though it doesn't really matter here since we do a separate test for Mac OS X). b=339987 r=mento sr=dougt git-svn-id: svn://10.0.0.236/trunk@198898 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/base/nsDebugImpl.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mozilla/xpcom/base/nsDebugImpl.cpp b/mozilla/xpcom/base/nsDebugImpl.cpp index 0df87ba7b5a..42a82c3c392 100644 --- a/mozilla/xpcom/base/nsDebugImpl.cpp +++ b/mozilla/xpcom/base/nsDebugImpl.cpp @@ -72,10 +72,6 @@ Abort(const char *aMsg); static void Break(const char *aMsg); -#if defined(__APPLE__) && defined(TARGET_CARBON) -# include "MacTypes.h" -#endif - #if defined(XP_OS2) # define INCL_WINDIALOGS // need for WinMessageBox # include @@ -461,10 +457,10 @@ Break(const char *aMsg) asm("int $3"); #elif defined(XP_BEOS) DEBUGGER(aMsg); -#elif defined(__GNUC__) && (defined(__i386) || defined(__x86_64__)) +#elif defined(XP_MACOSX) + raise(SIGTRAP); +#elif defined(__GNUC__) && (defined(__i386__) || defined(__i386) || defined(__x86_64__)) asm("int $3"); -#elif defined(__APPLE__) && defined(TARGET_CARBON) - Debugger(); #else // don't know how to break on this platform #endif