summaryrefslogtreecommitdiffstats
path: root/languages/cpp/debugger/tests/breakpoints/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/debugger/tests/breakpoints/main.cpp')
-rw-r--r--languages/cpp/debugger/tests/breakpoints/main.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/languages/cpp/debugger/tests/breakpoints/main.cpp b/languages/cpp/debugger/tests/breakpoints/main.cpp
new file mode 100644
index 00000000..81a5851f
--- /dev/null
+++ b/languages/cpp/debugger/tests/breakpoints/main.cpp
@@ -0,0 +1,38 @@
+
+void foo(int);
+
+void set_value(int* i)
+{
+ *i = 10;
+}
+
+void modify(int* i)
+{
+ *i = 15;
+}
+
+void read(int* i)
+{
+ static int i2;
+ i2 = *i;
+}
+
+int test_main(int* i)
+{
+ foo(5);
+ set_value(i);
+
+ modify(i);
+ read(i);
+
+ for(unsigned j = 0; j < 10; ++j)
+ foo(j);
+
+ return 0;
+}
+
+int main()
+{
+ int var;
+ return test_main(&var);
+}