1#ifdef _MSC_VER
2#include <intrin.h>
3#define BREAKPOINT_INTRINSIC() __debugbreak()
4#else
5#define BREAKPOINT_INTRINSIC() __asm__ __volatile__ ("int3")
6#endif
7
8int
9bar(int const *foo)
10{
11 int count = 0, i = 0;
12 for (; i < 10; ++i)
13 {
14 count += 1;
15 BREAKPOINT_INTRINSIC();
16 count += 1;
17 }
18 return *foo;
19}
20
21int
22main(int argc, char **argv)
23{
24 int foo = 42;
25 bar(foo: &foo);
26 return 0;
27}
28
29
30

source code of lldb/test/API/functionalities/breakpoint/debugbreak/main.c