aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/thread/step_until/main.c
blob: 4c52308f030e9859bfa8547fff9f87c0d983b6f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>

/* The return statements are purposefully so simple, and
 * unrelated to the program, just to achieve consistent
 * debug line tables, across platforms, that are not
 * dependent on compiler optimzations. */

int foo(int x) { return x; /* In foo */ }

int call_me(int argc) {
  printf ("At the start, argc: %d.\n", argc);

  if (argc < 2)
    return 1; /* Less than 2. */
  else
    return argc; /* Greater than or equal to 2. */
}

int
main(int argc, char **argv)
{
  int res = 0;
  res = call_me(argc); /* Back out in main. */
  if (res)
    printf("Result: %d. \n", res);

  return 0;
}