Skip to content

Commit f044863

Browse files
committed
try to fix raise(SIGTRAP) in nvcore
1 parent 1cd255f commit f044863

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Externals/NVTT/src/nvcore/Debug.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@
3030

3131
#else // NV_NO_ASSERT
3232

33+
# if NV_CC_MSVC
34+
// @@ Does this work in msvc-6 and earlier?
35+
# define nvDebugBreak() __debugbreak()
36+
//# define nvDebugBreak() __asm { int 3 }
37+
# elif NV_OS_ORBIS
38+
# define nvDebugBreak() __debugbreak()
39+
# elif NV_CC_GNUC
40+
# define nvDebugBreak() __builtin_trap()
41+
# else
42+
# error "No nvDebugBreak()!"
43+
# endif
44+
45+
/*
3346
# if NV_CC_MSVC
3447
// @@ Does this work in msvc-6 and earlier?
3548
// @@ Do I have to include <intrin.h> ?
@@ -39,13 +52,14 @@
3952
# define nvDebugBreak() __asm__ volatile ("trap");
4053
# elif NV_CC_GNUC && NV_CPU_X86 && NV_OS_DARWIN
4154
# define nvDebugBreak() __asm__ volatile ("int3");
42-
# elif NV_CC_GNUC && NV_CPU_X86
55+
# elif NV_CC_GNUC && NV_CPU_X86
4356
# define nvDebugBreak() __asm__ ( "int %0" : :"I"(3) )
4457
# else
4558
# include <signal.h>
4659
# define nvDebugBreak() raise(SIGTRAP);
4760
// define nvDebugBreak() *((int *)(0)) = 0
4861
# endif
62+
*/
4963

5064
# define nvAssertMacro(exp) \
5165
do { \

0 commit comments

Comments
 (0)