Commit | Line | Data |
---|---|---|
057fbfb2 HK |
1 | /* |
2 | * This file setups defines to compile arch specific binary from the | |
3 | * generic one. | |
4 | * | |
5 | * The function 'LIBUNWIND__ARCH_REG_ID' name is set according to arch | |
6 | * name and the defination of this function is included directly from | |
7 | * 'arch/arm64/util/unwind-libunwind.c', to make sure that this function | |
8 | * is defined no matter what arch the host is. | |
9 | * | |
10 | * Finally, the arch specific unwind methods are exported which will | |
11 | * be assigned to each arm64 thread. | |
12 | */ | |
13 | ||
14 | #define REMOTE_UNWIND_LIBUNWIND | |
15 | ||
3bd03c95 HK |
16 | /* Define arch specific functions & regs for libunwind, should be |
17 | * defined before including "unwind.h" | |
18 | */ | |
057fbfb2 | 19 | #define LIBUNWIND__ARCH_REG_ID(regnum) libunwind__arm64_reg_id(regnum) |
3bd03c95 HK |
20 | #define LIBUNWIND__ARCH_REG_IP PERF_REG_ARM64_PC |
21 | #define LIBUNWIND__ARCH_REG_SP PERF_REG_ARM64_SP | |
057fbfb2 HK |
22 | |
23 | #include "unwind.h" | |
24 | #include "debug.h" | |
25 | #include "libunwind-aarch64.h" | |
26 | #include <../../../../arch/arm64/include/uapi/asm/perf_regs.h> | |
27 | #include "../../arch/arm64/util/unwind-libunwind.c" | |
28 | ||
29 | /* NO_LIBUNWIND_DEBUG_FRAME is a feature flag for local libunwind, | |
30 | * assign NO_LIBUNWIND_DEBUG_FRAME_AARCH64 to it for compiling arm64 | |
31 | * unwind methods. | |
32 | */ | |
33 | #undef NO_LIBUNWIND_DEBUG_FRAME | |
34 | #ifdef NO_LIBUNWIND_DEBUG_FRAME_AARCH64 | |
35 | #define NO_LIBUNWIND_DEBUG_FRAME | |
36 | #endif | |
37 | #include "util/unwind-libunwind-local.c" | |
38 | ||
39 | struct unwind_libunwind_ops * | |
40 | arm64_unwind_libunwind_ops = &_unwind_libunwind_ops; |