[AMDGPU] Add True16 register classes.
[llvm-project.git] / lldb / test / API / python_api / thread / main2.cpp
blobb07841ccc682d769de1d807ab260ca06c77b0bee
1 #include <stdio.h>
2 #include <stdlib.h>
4 int a(int);
5 int b(int);
6 int c(int);
8 int a(int val)
10 if (val <= 1)
11 return b(val);
12 else if (val >= 3)
13 return c(val);
15 return val;
18 int b(int val)
20 int rc = c(val);
21 void *ptr = malloc(1024); // thread step-out of malloc into function b.
22 if (!ptr)
23 return -1;
24 else
25 printf("ptr=%p\n", ptr);
26 return rc; // we should reach here after 3 step-over's.
29 int c(int val)
31 return val + 3;
34 int main (int argc, char const *argv[])
36 int A1 = a(1);
37 printf("a(1) returns %d\n", A1);
39 int B2 = b(2);
40 printf("b(2) returns %d\n", B2);
42 int A3 = a(3);
43 printf("a(3) returns %d\n", A3);
45 return 0;