summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp
blob: 2fd063113875fad5a8d520800456e6f2200fb0dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <thread>

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

int main(int argc, char const *argv[]) {
  std::thread thread1(function, 2);
  std::thread thread2(function, 4);
  thread1.join();
  thread2.join();
  return 0;
}
OpenPOWER on IntegriCloud