1#include <stdio.h>
2
3// This simple program is to demonstrate the capability of the lldb command
4// "breakpoint modify -i <count> breakpt-id" to set the number of times a
5// breakpoint is skipped before stopping. Ignore count can also be set upon
6// breakpoint creation by 'breakpoint set ... -i <count>'.
7
8int a(int);
9int b(int);
10int c(int);
11
12int a(int val)
13{
14 if (val <= 1)
15 return b(val);
16 else if (val >= 3)
17 return c(val); // a(3) -> c(3) Find the call site of c(3).
18
19 return val;
20}
21
22int b(int val)
23{
24 return c(val);
25}
26
27int c(int val)
28{
29 return val + 3; // Find the line number of function "c" here.
30}
31
32int main (int argc, char const *argv[])
33{
34 int A1 = a(val: 1); // a(1) -> b(1) -> c(1)
35 printf(format: "a(1) returns %d\n", A1);
36
37 int B2 = b(val: 2); // b(2) -> c(2) Find the call site of b(2).
38 printf(format: "b(2) returns %d\n", B2);
39
40 int A3 = a(val: 3); // a(3) -> c(3) Find the call site of a(3).
41 printf(format: "a(3) returns %d\n", A3);
42
43 int C1 = c(val: 5); // Find the call site of c in main.
44 printf (format: "c(5) returns %d\n", C1);
45 return 0;
46}
47

source code of lldb/test/API/functionalities/breakpoint/breakpoint_names/main.c