xref: /llvm-project/lldb/test/API/functionalities/thread/step_until/main.c (revision f66a5e220cbc2650a5843db854d0734d2aaa030f)
1 #include <stdio.h>
2 
3 /* The return statements are purposefully so simple, and
4  * unrelated to the program, just to achieve consistent
5  * debug line tables, across platforms, that are not
6  * dependent on compiler optimzations. */
7 
8 int foo(int x) { return x; /* In foo */ }
9 
10 int call_me(int argc) {
11   printf ("At the start, argc: %d.\n", argc);
12 
13   if (argc < 2)
14     return 1; /* Less than 2. */
15   else
16     return argc; /* Greater than or equal to 2. */
17 }
18 
19 int
20 main(int argc, char **argv)
21 {
22   int res = 0;
23   res = call_me(argc); /* Back out in main. */
24   if (res)
25     printf("Result: %d. \n", res);
26 
27   return 0;
28 }
29