Skip to content

Commit

Permalink
try to fix raise(SIGTRAP) in nvcore
Browse files Browse the repository at this point in the history
  • Loading branch information
q4a committed May 26, 2018
1 parent 1cd255f commit f044863
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Externals/NVTT/src/nvcore/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@

#else // NV_NO_ASSERT

# if NV_CC_MSVC
// @@ Does this work in msvc-6 and earlier?
# define nvDebugBreak() __debugbreak()
//# define nvDebugBreak() __asm { int 3 }
# elif NV_OS_ORBIS
# define nvDebugBreak() __debugbreak()
# elif NV_CC_GNUC
# define nvDebugBreak() __builtin_trap()
# else
# error "No nvDebugBreak()!"
# endif

/*
# if NV_CC_MSVC
// @@ Does this work in msvc-6 and earlier?
// @@ Do I have to include <intrin.h> ?
Expand All @@ -39,13 +52,14 @@
# define nvDebugBreak() __asm__ volatile ("trap");
# elif NV_CC_GNUC && NV_CPU_X86 && NV_OS_DARWIN
# define nvDebugBreak() __asm__ volatile ("int3");
# elif NV_CC_GNUC && NV_CPU_X86
# elif NV_CC_GNUC && NV_CPU_X86
# define nvDebugBreak() __asm__ ( "int %0" : :"I"(3) )
# else
# include <signal.h>
# define nvDebugBreak() raise(SIGTRAP);
// define nvDebugBreak() *((int *)(0)) = 0
# endif
*/

# define nvAssertMacro(exp) \
do { \
Expand Down

0 comments on commit f044863

Please sign in to comment.