1#include <stdio.h>
2
3inline void test1(int) __attribute__ ((always_inline));
4inline void test2(int) __attribute__ ((always_inline));
5
6// Called once from main with b==42 then called from test1 with b==24.
7void test2(int b) {
8 printf(format: "test2(%d)\n", b); // first breakpoint
9 {
10 int c = b * 2;
11 printf(format: "c=%d\n", c); // second breakpoint
12 }
13}
14
15void test1(int a) {
16 printf(format: "test1(%d)\n", a);
17 test2(b: a + 1); // third breakpoint
18}
19
20int main(int argc) {
21 test2(b: 42);
22 test1(a: 23);
23 return 0;
24}
25

Provided by KDAB

Privacy Policy
Improve your Profiling and Debugging skills
Find out more

source code of lldb/test/API/lang/c/inlines/main.c