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 -c 'val == 3' breakpt-id" to break within c(int val) only
12 // when the value of the arg is 3.
23 return c(val); // Find the line number of c's parent call here.
35 return val + 3; // Find the line number of function "c" here.
38 int main (int argc, char const *argv[])
40 int A1 = a(1); // a(1) -> b(1) -> c(1)
41 printf("a(1) returns %d\n", A1);
43 int B2 = b(2); // b(2) -> c(2)
44 printf("b(2) returns %d\n", B2);
46 int A3 = a(3); // a(3) -> c(3)
47 printf("a(3) returns %d\n", A3);
49 for (int i = 0; i < 2; ++i)