feature (memory management): implemented a function to read the caller from the stack

This commit is contained in:
antifallobst 2023-06-01 11:40:12 +02:00
parent 7d33377806
commit 263e7305cf
2 changed files with 9 additions and 0 deletions

View File

@ -11,4 +11,6 @@
void stack_dump_call_info (uint64_t rip, symbol_T* symbol);
void stack_trace_call_stack (uint64_t rbp);
extern uint64_t stack_get_caller();
#endif //NOX_STACK_H

View File

@ -0,0 +1,7 @@
; This file is part of noxos and licensed under the MIT open source license
stack_get_caller:
mov rax, [rbp + 0x8]
ret
GLOBAL stack_get_caller