[kernel] Add get_grandcaller debug function

This should probably be replaced with a function taking the number of
steps back, but this is quick and useful.
This commit is contained in:
Justin C. Miller
2021-07-15 23:34:35 -07:00
parent edfc5ab8b4
commit 972a35bdef
2 changed files with 8 additions and 0 deletions

View File

@@ -14,6 +14,13 @@ get_caller:
mov rax, [rbp+8]
ret
global get_grandcaller
get_grandcaller:
; No prelude - don't touch rsp or rbp
mov rax, [rbp]
mov rax, [rax+8]
ret
global get_gsbase
get_gsbase:
rdgsbase rax