xref: /linux/tools/perf/util/unwind-libdw.h (revision 1f10d82e6adffd45cf1a59618d1ecc33625a8a37)
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_mips(Dwfl_Thread *thread, void *arg);
13 bool libdw_set_initial_registers_powerpc(Dwfl_Thread *thread, void *arg);
14 bool libdw_set_initial_registers_riscv(Dwfl_Thread *thread, void *arg);
15 bool libdw_set_initial_registers_s390(Dwfl_Thread *thread, void *arg);
16 
17 struct unwind_info {
18 	Dwfl			*dwfl;
19 	struct perf_sample      *sample;
20 	struct machine          *machine;
21 	struct thread           *thread;
22 	unwind_entry_cb_t	cb;
23 	void			*arg;
24 	int			max_stack;
25 	int			idx;
26 	uint16_t		e_machine;
27 	bool			best_effort;
28 	struct unwind_entry	entries[];
29 };
30 
31 #endif /* __PERF_UNWIND_LIBDW_H */
32