Add simple stack trace to exception handler

This commit is contained in:
Justin C. Miller
2018-05-05 17:12:02 -07:00
parent 569bc243f1
commit 34156c55ae
5 changed files with 39 additions and 3 deletions

View File

@@ -10,3 +10,20 @@ global _halt
_halt:
hlt
jmp _halt
global get_frame
get_frame:
mov rcx, rbp
.loop:
mov rax, [rcx + 8]
mov rcx, [rcx]
cmp rdi, 0
je .done
sub rdi, 1
jmp .loop
.done:
ret