2024-01-30 15:19:33 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
// Fill dst with a stack trace consisting of return addresses
|
|
|
|
// in order from top to bottom. returns the number filled (at most len)
|
|
|
|
size_t backtrace(void **dst, size_t len);
|
|
|
|
|
|
|
|
// same as backtrace but with specified instruction and base pointer
|
2024-02-01 03:30:35 +00:00
|
|
|
size_t backtrace_ex(void **dst, size_t len, void *ip, void *bp);
|
2024-01-30 15:19:33 +00:00
|
|
|
|
|
|
|
// Log a backtrace
|
|
|
|
void log_backtrace();
|
|
|
|
|
|
|
|
// same as log_backtrace with specified insruction and base pointer
|
|
|
|
void log_backtrace_ex(void *ip, void *bp);
|