2 * Unwinder backends interface.
4 * Copyright (c) 2013 Luca Clementi <luca.clementi@gmail.com>
5 * Copyright (c) 2013-2018 The strace developers.
7 * SPDX-License-Identifier: LGPL-2.1-or-later
10 #ifndef STRACE_UNWIND_H
11 # define STRACE_UNWIND_H
16 * Type used in stacktrace walker.
19 /* This storage be enough large to store unw_word_t. */
20 typedef unsigned long unwind_function_offset_t;
22 typedef void (*unwind_call_action_fn)(void *data,
23 const char *binary_filename,
24 const char *symbol_name,
25 unwind_function_offset_t function_offset,
26 unsigned long true_offset);
27 typedef void (*unwind_error_action_fn)(void *data,
29 unsigned long true_offset);
31 struct unwind_unwinder_t {
34 /* Initialize the unwinder. */
37 /* Make/destroy the context data attached to tcb. */
38 void * (*tcb_init)(struct tcb *);
39 void (*tcb_fin)(struct tcb *);
42 void (*tcb_walk)(struct tcb *,
43 unwind_call_action_fn,
44 unwind_error_action_fn,
48 extern const struct unwind_unwinder_t unwinder;
50 #endif /* !STRACE_UNWIND_H */