, ARM, MS Visual Studio:)
Also, I better not link the extra code in the library version of my module. The need to include "winbase.h" for DebugBreak () was one "bad" of it, the better to have some internal ones. But this is a little "bad", because in the final version there will be no breakpoints :)
Using crashmstr's answer , I found alternatives to DebugBreak () . And now I use the following construction:
#ifdef _DEBUG
#ifdef _MSC_VER
#ifdef _X86_
#define myDebugBreak { __asm { int 3 } }
#else
#define myDebugBreak { __debugbreak(); }
#endif
#else
#define myDebugBreak { asm { trap } }
#endif
#else
#define myDebugBreak
#endif
#define break_here(condition) if (condition) { myDebugBreak; return H_FAIL; }
zxcat source
share