aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/tools/lldb-dap/step/main.cpp
blob: 7320e83154f5ba09ef22f9a8f555374316372afb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "other.h"

int function(int x) {
  if ((x % 2) == 0)
    return function(x - 1) + x; // breakpoint 1
  else
    return x;
}

int function2() {
  int volatile value = 3; // breakpoint 2
  inlined_fn();           // position_after_step_over

  return value;
}

int main(int argc, char const *argv[]) {
  int func_result = function2();
  return function(2) - func_result; // returns 0
}