feature: print_stack working (dont use opti flags, else the stack is broken)

This commit is contained in:
2024-09-17 11:10:41 +02:00
parent 963bf46b62
commit a02931a165
10 changed files with 53 additions and 25 deletions

13
src/debug/print_stack.c Normal file
View File

@ -0,0 +1,13 @@
#include "debug.h"
#include "kprintf.h"
void print_stack(void)
{
struct stackframe *stack =
(struct stackframe *)__builtin_frame_address(0);
while (stack) {
kprintf(0, "stack->ebp: %d\n", stack->ebp);
stack = stack->ebp;
}
}