1#include <stdio.h>
2#include "inlines.h"
3
4#define INLINE_ME __inline__ __attribute__((always_inline))
5
6int
7not_inlined_2 (int input)
8{
9 printf (format: "Called in not_inlined_2 with : %d.\n", input);
10 return input;
11}
12
13int
14not_inlined_1 (int input)
15{
16 printf (format: "Called in not_inlined_1 with %d.\n", input);
17 return not_inlined_2(input);
18}
19
20INLINE_ME int
21inner_inline (int inner_input, int mod_value)
22{
23 int inner_result;
24 inner_result = inner_input % mod_value;
25 printf (format: "Returning: %d.\n", inner_result);
26 return not_inlined_1 (input: inner_result);
27}
28
29INLINE_ME int
30outer_inline (int outer_input)
31{
32 int outer_result;
33
34 outer_result = inner_inline (inner_input: outer_input, mod_value: outer_input % 3);
35 return outer_result;
36}
37
38int
39main (int argc, char **argv)
40{
41 printf (format: "Starting...\n");
42
43 int (*func_ptr) (int);
44 func_ptr = outer_inline;
45
46 outer_inline (outer_input: argc); // This should correspond to the first break stop.
47
48 func_ptr (argc); // This should correspond to the second break stop.
49
50 return 0;
51}
52
53
54

source code of lldb/test/API/python_api/frame/inlines/inlines.c