diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-03-10 21:18:00 +0000 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-03-10 21:18:00 +0000 |
commit | 31022681543932ae4fce2bae5bc9d024c8178f1a (patch) | |
tree | 88205f1050a5fc6fbde7bf3c91937092c7ba07ca | |
parent | 34497eabc803fd979c58824d4737cabde1fb47e5 (diff) |
gallium: Use hardcoded breakpoints on x86 targets.
-rw-r--r-- | src/gallium/auxiliary/util/p_debug.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/util/p_debug.c b/src/gallium/auxiliary/util/p_debug.c index 6255d716a6..93bfaea393 100644 --- a/src/gallium/auxiliary/util/p_debug.c +++ b/src/gallium/auxiliary/util/p_debug.c @@ -81,14 +81,17 @@ void debug_printf(const char *format, ...) } -static INLINE void debug_abort(void) +/* TODO: implement a debug_abort that calls EngBugCheckEx on WIN32 */ + + +static INLINE void debug_break(void) { -#ifdef WIN32 -#ifndef WINCE - EngDebugBreak(); -#else +#if (defined(__i386__) || defined(__386__)) && defined(__GNUC__) + __asm("int3"); +#elif (defined(__i386__) || defined(__386__)) && defined(__MSC__) _asm {int 3}; -#endif +#elif defined(WIN32) && !defined(WINCE) + EngDebugBreak(); #else abort(); #endif @@ -98,5 +101,5 @@ static INLINE void debug_abort(void) void debug_assert_fail(const char *expr, const char *file, unsigned line) { debug_printf("%s:%i: Assertion `%s' failed.\n", file, line, expr); - debug_abort(); + debug_break(); } |