[LibOS] Implement arch-specific shim_regs_get_ip()

This commit is contained in:
Stefan Berger
2020-06-25 14:46:33 +02:00
committed by Michał Kowalczyk
parent ecf93f79a3
commit 29e2f796f2
2 changed files with 5 additions and 1 deletions
@@ -34,6 +34,10 @@ static inline void shim_regs_set_sp(struct shim_regs* sr, uint64_t sp) {
sr->rsp = sp;
}
static inline uint64_t shim_regs_get_ip(struct shim_regs* sr) {
return sr->rip;
}
static inline uint64_t shim_regs_get_syscallnr(struct shim_regs* sr) {
return sr->orig_rax;
}
+1 -1
View File
@@ -131,7 +131,7 @@ static int clone_implementation_wrapper(struct shim_clone_args * arg)
//user_stack_addr[1] ==> arguments to user provided function.
debug("child swapping stack to %p return 0x%lx: %d\n",
stack, regs.rip, my_thread->tid);
stack, shim_regs_get_ip(&regs), my_thread->tid);
tcb->context.regs = &regs;
fixup_child_context(tcb->context.regs);