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_csky(Dwfl_Thread *thread, void *arg); 13 bool libdw_set_initial_registers_loongarch(Dwfl_Thread *thread, void *arg); 14 bool libdw_set_initial_registers_mips(Dwfl_Thread *thread, void *arg); 15 bool libdw_set_initial_registers_powerpc(Dwfl_Thread *thread, void *arg); 16 bool libdw_set_initial_registers_riscv(Dwfl_Thread *thread, void *arg); 17 bool libdw_set_initial_registers_s390(Dwfl_Thread *thread, void *arg); 18 19 struct unwind_info { 20 Dwfl *dwfl; 21 struct perf_sample *sample; 22 struct machine *machine; 23 struct thread *thread; 24 unwind_entry_cb_t cb; 25 void *arg; 26 int max_stack; 27 int idx; 28 uint16_t e_machine; 29 bool best_effort; 30 struct unwind_entry entries[]; 31 }; 32 33 #endif /* __PERF_UNWIND_LIBDW_H */ 34