unwind.h 902 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#ifndef __UNWIND_H
#define __UNWIND_H

#include "types.h"
#include "event.h"
#include "symbol.h"

struct unwind_entry {
	struct map	*map;
	struct symbol	*sym;
	u64		ip;
};

typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg);

16
#ifdef HAVE_DWARF_UNWIND_SUPPORT
17 18 19
int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
			struct machine *machine,
			struct thread *thread,
20
			struct perf_sample *data, int max_stack);
21 22
/* libunwind specific */
#ifdef HAVE_LIBUNWIND_SUPPORT
23
int libunwind__arch_reg_id(int regnum);
24
#endif
25 26
#else
static inline int
27 28 29 30
unwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
		    void *arg __maybe_unused,
		    struct machine *machine __maybe_unused,
		    struct thread *thread __maybe_unused,
31 32
		    struct perf_sample *data __maybe_unused,
		    int max_stack __maybe_unused)
33 34 35
{
	return 0;
}
36
#endif /* HAVE_DWARF_UNWIND_SUPPORT */
37
#endif /* __UNWIND_H */
新手
引导
客服 返回
顶部