1// This program makes a multi tier nested function call to test AArch64
2// Pointer Authentication feature.
3
4// To enable PAC return address signing compile with following clang arguments:
5// -march=armv8.3-a -mbranch-protection=pac-ret+leaf
6
7#include <stdlib.h>
8
9static void __attribute__((noinline)) func_c(void) {
10 exit(status: 0); // Frame func_c
11}
12
13static void __attribute__((noinline)) func_b(void) {
14 func_c(); // Frame func_b
15}
16
17static void __attribute__((noinline)) func_a(void) {
18 func_b(); // Frame func_a
19}
20
21int main(int argc, char *argv[]) {
22 func_a(); // Frame main
23 return 0;
24}
25

source code of lldb/test/API/functionalities/unwind/aarch64_unwind_pac/main.c