From 78b9749c0a4ea980a8b934645da6ae98fcc665e8 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 6 Jan 2016 20:12:03 +0000 Subject: Vendor import of lldb trunk r256945: https://llvm.org/svn/llvm-project/lldb/trunk@256945 --- .../postmortem/minidump/fizzbuzz.cpp | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp (limited to 'packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp') diff --git a/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp new file mode 100644 index 0000000..eb6476b --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp @@ -0,0 +1,31 @@ +// A sample program for getting minidumps on Windows. + +#include + +bool +fizz(int x) +{ + return x % 3 == 0; +} + +bool +buzz(int x) +{ + return x % 5 == 0; +} + +int +main() +{ + int *buggy = 0; + + for (int i = 1; i <= 100; ++i) + { + if (fizz(i)) std::cout << "fizz"; + if (buzz(i)) std::cout << "buzz"; + if (!fizz(i) && !buzz(i)) std::cout << i; + std::cout << '\n'; + } + + return *buggy; +} -- cgit v1.1