1volatile int x;
2
3void __attribute__((noinline)) sink() {
4 x++; /* break here */
5}
6
7void __attribute__((noinline)) func3() { sink(); /* tail */ }
8
9void __attribute__((disable_tail_calls, noinline)) func2() { func3(); /* regular */ }
10
11void __attribute__((noinline)) func1() { func2(); /* tail */ }
12
13int __attribute__((disable_tail_calls)) main() {
14 func1(); /* regular */
15 return 0;
16}
17

source code of lldb/test/API/functionalities/tail_call_frames/sbapi_support/main.cpp