1 //===-- main.c --------------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 // This simple program is to demonstrate the capability of the lldb command
11 // "breakpoint modify -i <count> breakpt-id" to set the number of times a
12 // breakpoint is skipped before stopping. Ignore count can also be set upon
13 // breakpoint creation by 'breakpoint set ... -i <count>'.
24 return c(val); // a(3) -> c(3) Find the call site of c(3).
36 return val + 3; // Find the line number of function "c" here.
39 int main (int argc, char const *argv[])
41 int A1 = a(1); // a(1) -> b(1) -> c(1)
42 printf("a(1) returns %d\n", A1);
44 int B2 = b(2); // b(2) -> c(2) Find the call site of b(2).
45 printf("b(2) returns %d\n", B2);
47 int A3 = a(3); // a(3) -> c(3) Find the call site of a(3).
48 printf("a(3) returns %d\n", A3);
50 int C1 = c(5); // Find the call site of c in main.
51 printf ("c(5) returns %d\n", C1);