mirror of
https://git.stationery.faith/corn/corn.git
synced 2024-11-09 23:22:08 +00:00
16 lines
500 B
C
16 lines
500 B
C
#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
|
|
size_t backtrace_ex(void **dst, size_t len, void *ip, void *bp);
|
|
|
|
// Log a backtrace
|
|
void log_backtrace();
|
|
|
|
// same as log_backtrace with specified insruction and base pointer
|
|
void log_backtrace_ex(void *ip, void *bp);
|