diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/arch/amd64/debug.c | 5 | ||||
-rw-r--r-- | src/kernel/arch/amd64/sysenter.s | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/arch/amd64/debug.c b/src/kernel/arch/amd64/debug.c index c17c906..c273c39 100644 --- a/src/kernel/arch/amd64/debug.c +++ b/src/kernel/arch/amd64/debug.c @@ -13,6 +13,9 @@ void *debug_caller(size_t depth) { void debug_stacktrace(void) { for (size_t i = 0; i < 16; i++) { - kprintf(" k/%08x\n", (uintptr_t)debug_caller(i)); + void *ptr = debug_caller(i); + if (!ptr) break; + kprintf(" k/%08x", (uintptr_t)ptr); } + kprintf("\n"); } diff --git a/src/kernel/arch/amd64/sysenter.s b/src/kernel/arch/amd64/sysenter.s index 9dc907f..1dfb422 100644 --- a/src/kernel/arch/amd64/sysenter.s +++ b/src/kernel/arch/amd64/sysenter.s @@ -108,4 +108,5 @@ sysenter_stage1: push %r15 mov $_bss_end, %rsp + push $0 // for stacktraces jmp sysenter_stage2 |