1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __PERF_UNWIND_LIBDW_H 3 #define __PERF_UNWIND_LIBDW_H 4 5 #include <elfutils/libdwfl.h> 6 #include "unwind.h" 7 8 struct machine; 9 struct perf_sample; 10 struct thread; 11 12 bool libdw_set_initial_registers_arm(Dwfl_Thread *thread, void *arg); 13 bool libdw_set_initial_registers_arm64(Dwfl_Thread *thread, void *arg); 14 bool libdw_set_initial_registers_csky(Dwfl_Thread *thread, void *arg); 15 bool libdw_set_initial_registers_loongarch(Dwfl_Thread *thread, void *arg); 16 bool libdw_set_initial_registers_mips(Dwfl_Thread *thread, void *arg); 17 bool libdw_set_initial_registers_powerpc(Dwfl_Thread *thread, void *arg); 18 bool libdw_set_initial_registers_riscv(Dwfl_Thread *thread, void *arg); 19 bool libdw_set_initial_registers_s390(Dwfl_Thread *thread, void *arg); 20 21 struct unwind_info { 22 Dwfl *dwfl; 23 struct perf_sample *sample; 24 struct machine *machine; 25 struct thread *thread; 26 unwind_entry_cb_t cb; 27 void *arg; 28 int max_stack; 29 int idx; 30 uint16_t e_machine; 31 bool best_effort; 32 struct unwind_entry entries[]; 33 }; 34 35 #endif /* __PERF_UNWIND_LIBDW_H */ 36