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 8 int a(int); 9 int b(int); 10 int c(int); 11 12 int 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 22 int b(int val) 23 { 24 return c(val); 25 } 26 27 int c(int val) 28 { 29 return val + 3; // Find the line number of function "c" here. 30 } 31 32 int main (int argc, char const *argv[]) 33 { 34 int A1 = a(1); // a(1) -> b(1) -> c(1) 35 printf("a(1) returns %d\n", A1); 36 37 int B2 = b(2); // b(2) -> c(2) Find the call site of b(2). 38 printf("b(2) returns %d\n", B2); 39 40 int A3 = a(3); // a(3) -> c(3) Find the call site of a(3). 41 printf("a(3) returns %d\n", A3); 42 43 int C1 = c(5); // Find the call site of c in main. 44 printf ("c(5) returns %d\n", C1); 45 return 0; 46 } 47