#ifndef __PBACKTRACE_H__
#define __PBACKTRACE_H__ 1

#include <stdint.h>

// Backtrace handling part of i77 perms.

extern void *__bt_state;

extern int bt_callback(void *v, uintptr_t u, const char *filename, int lineno, const char *function);
extern void bt_error_callback(void *v, const char *msg, int errnum);
extern void bt_error_callback_create(void *v, const char *msg, int errnum);
extern void init_back_trace(const char *filename);
extern void print_back_trace(void);

void __cyg_profile_func_enter(void *this_fn, void *call_site) __attribute__((no_instrument_function));
void __cyg_profile_func_exit(void *this_fn, void *call_site) __attribute__((no_instrument_function));

#endif // defined __PBACKTRACE_H__
