Fission FSN
Loading...
Searching...
No Matches
fsBreak.h
Go to the documentation of this file.
1/********************************************************************
2*
3* Created: 9/2/2014 10:38
4*
5* File: fsBreak.h
6*
7* Author: Mick Waites
8*
9* Purpose: Win32 detail for fsBreak
10*
11*********************************************************************/
12
13#ifndef fsBreakMLhdr
14#define fsBreakMLhdr
15
17
18
19/*
20http://stackoverflow.com/questions/2389270/visual-studio-can-be-a-breakpoint-called-from-code
21Use the __debug_break() intrinsic(requires the inclusion of <intrin.h>).
22
23Using __debug_break() is preferable to directly writing __asm { int 3 } since inline assembly is not permitted when compiling code for the x64 architecture.
24
25 And for the record, on Linux and Mac, with GCC, I'm using __builtin_trap().
26*/
27
28#if defined fsDEBUG || defined fsDEVELOP
29
30#if defined __ARMCC_VERSION || defined __GNUC__
31 #define fsBreak() __builtin_trap();
32#else
33 #define fsBreak() __debugbreak();
34#endif
35
36 #define fsAssertWindow(assertStr)
37#else
38#define fsBreak()
39#define fsAssertWindow(assertStr)
40#endif
41
42#endif