From 7fed546d1996271dabc7cf71d4d033125c4da4ee Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 13 Jan 2016 20:06:56 +0000 Subject: Vendor import of lldb trunk r257626: https://llvm.org/svn/llvm-project/lldb/trunk@257626 --- .../functionalities/breakpoint/debugbreak/main.c | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c (limited to 'packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c') diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c b/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c new file mode 100644 index 0000000000000..5f936327e4eae --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c @@ -0,0 +1,29 @@ +#ifdef _MSC_VER +#include +#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; +} + + -- cgit v1.2.3