Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * This file setups defines to compile arch specific binary from the
0004  * generic one.
0005  *
0006  * The function 'LIBUNWIND__ARCH_REG_ID' name is set according to arch
0007  * name and the definition of this function is included directly from
0008  * 'arch/arm64/util/unwind-libunwind.c', to make sure that this function
0009  * is defined no matter what arch the host is.
0010  *
0011  * Finally, the arch specific unwind methods are exported which will
0012  * be assigned to each arm64 thread.
0013  */
0014 
0015 #define REMOTE_UNWIND_LIBUNWIND
0016 
0017 /* Define arch specific functions & regs for libunwind, should be
0018  * defined before including "unwind.h"
0019  */
0020 #define LIBUNWIND__ARCH_REG_ID(regnum) libunwind__arm64_reg_id(regnum)
0021 #define LIBUNWIND__ARCH_REG_IP PERF_REG_ARM64_PC
0022 #define LIBUNWIND__ARCH_REG_SP PERF_REG_ARM64_SP
0023 
0024 #include "unwind.h"
0025 #include "libunwind-aarch64.h"
0026 #define perf_event_arm_regs perf_event_arm64_regs
0027 #include <../../../arch/arm64/include/uapi/asm/perf_regs.h>
0028 #undef perf_event_arm_regs
0029 #include "../../arch/arm64/util/unwind-libunwind.c"
0030 
0031 /* NO_LIBUNWIND_DEBUG_FRAME is a feature flag for local libunwind,
0032  * assign NO_LIBUNWIND_DEBUG_FRAME_AARCH64 to it for compiling arm64
0033  * unwind methods.
0034  */
0035 #undef NO_LIBUNWIND_DEBUG_FRAME
0036 #ifdef NO_LIBUNWIND_DEBUG_FRAME_AARCH64
0037 #define NO_LIBUNWIND_DEBUG_FRAME
0038 #endif
0039 #include "util/unwind-libunwind-local.c"
0040 
0041 struct unwind_libunwind_ops *
0042 arm64_unwind_libunwind_ops = &_unwind_libunwind_ops;