reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
#ifdef _MSC_VER
#include <intrin.h>
#define BREAKPOINT_INTRINSIC()    __debugbreak()
#else
#define BREAKPOINT_INTRINSIC()    __asm__ __volatile__ ("int3")
#endif

int
bar(int const *foo)
{
    int count = 0, i = 0;
    for (; i < 10; ++i)
    {
        count += 1;
        BREAKPOINT_INTRINSIC();
        count += 1;
    }
    return *foo;
}

int
main(int argc, char **argv)
{
    int foo = 42;
    bar(&foo);
    return 0;
}