xref: /llvm-project/lldb/test/API/tools/lldb-dap/instruction-breakpoint/main.cpp (revision 89c27d6b07dd03a71e5692caa4e20ab14f948921)
1 #include <stdio.h>
2 #include <unistd.h>
3 
4 int function(int x) {
5 
6   if (x == 0) // breakpoint 1
7     return x;
8 
9   if ((x % 2) != 0)
10     return x;
11   else
12     return function(x - 1) + x;
13 }
14 
15 int main(int argc, char const *argv[]) {
16   int n = function(2);
17   return n;
18 }