mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 15:38:22 +00:00
elf loading and userland
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#define TRACE_MAXDEPTH 10
|
||||
|
||||
static void tracestack(uint64_t** addr){
|
||||
|
||||
for(size_t depth = 0; depth < TRACE_MAXDEPTH; ++depth){
|
||||
|
||||
uint64_t *calleeaddr = *(addr + 1);
|
||||
@@ -34,8 +33,11 @@ __attribute((noreturn)) void _panic(char* reason, arch_regs *reg){
|
||||
);
|
||||
|
||||
printf("Panic location: %p\n", reg->rip);
|
||||
printf("Stack trace:\n");
|
||||
tracestack((uint64_t**)reg->rbp);
|
||||
|
||||
if(reg->rbp != 0){
|
||||
printf("Stack trace:\n");
|
||||
tracestack((uint64_t**)reg->rbp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user