mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
Add simple stack trace to exception handler
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user