Changeset 938 in vbox for trunk/include/iprt/assert.h
- Timestamp:
- Feb 15, 2007 9:00:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assert.h
r1 r938 41 41 # ifdef __GNUC__ 42 42 # ifndef __L4ENV__ 43 # define AssertBreakpoint() do { __asm__ __volatile__ ("int3\n\tnop");} while (0)43 # define AssertBreakpoint() do { if (RTAssertDoBreakpoint()) { __asm__ __volatile__ ("int3\n\tnop"); } } while (0) 44 44 # else 45 # define AssertBreakpoint() do { __asm__ __volatile__ ("int3; jmp 1f; 1:");} while (0)45 # define AssertBreakpoint() do { if (RTAssertDoBreakpoint()) { __asm__ __volatile__ ("int3; jmp 1f; 1:"); } } while (0) 46 46 # endif 47 # elif defined(_MSC_VER) 48 # define AssertBreakpoint() do { if (RTAssertDoBreakpoint()) { __debugbreak(); } } while (0) 47 49 # else 48 # ifdef IN_RING0 49 # define AssertBreakpoint() do { if (RTAssertDoBreakpoint()) __debugbreak(); } while (0) 50 # else 51 # define AssertBreakpoint() __debugbreak() 52 # endif 50 # error "Unknown compiler" 53 51 # endif 54 52 #else … … 484 482 # define AssertReleaseBreakpoint() do { __asm__ __volatile__ ("int3; jmp 1f; 1:"); } while (0) 485 483 # endif 486 #el se484 #elif defined(_MSC_VER) 487 485 # define AssertReleaseBreakpoint() __debugbreak() 486 #else 487 # error "Unknown compiler" 488 488 #endif 489 489 … … 1085 1085 1086 1086 /** 1087 * Check if we really want to hit a breakpoint. 1088 * Can jump back to ring-3 when the longjmp is armed. 1089 */ 1090 RTDECL(bool) RTAssertDoBreakpoint(void); 1087 * Overridable function that decides whether assertions executes the breakpoint or not. 1088 * 1089 * The generic implementation will return true. 1090 * 1091 * @returns true if the breakpoint should be hit, false if it should be ignored. 1092 * @remark The RTDECL() makes this a bit difficult to override on windows. Sorry. 1093 */ 1094 RTDECL(bool) RTAssertDoBreakpoint(void); 1095 1091 1096 1092 1097 /** The last assert message, 1st part. */
Note:
See TracChangeset
for help on using the changeset viewer.