mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
panic: print backtrace on panic
Panics currently lack backtraces, which are a very useful thing to have. Make the profiling backtrace function generic and print backtraces using it.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#ifndef _ARCH_BACKTRACE_H
|
||||
#define _ARCH_BACKTRACE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <arch/context.h>
|
||||
|
||||
typedef bool (*backtrace_fn_t)(void *ctx, void *ip);
|
||||
|
||||
void arch_get_backtrace(context_t *cpu_context, backtrace_fn_t fn, void *context);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user