mirror of
https://github.com/clearlinux/graphene.git
synced 2026-10-03 23:48:19 +00:00
[LibOS] Implement arch-specific shim_regs_get_ip()
This commit is contained in:
committed by
Michał Kowalczyk
parent
ecf93f79a3
commit
29e2f796f2
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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(®s), my_thread->tid);
|
||||
|
||||
tcb->context.regs = ®s;
|
||||
fixup_child_context(tcb->context.regs);
|
||||
|
||||
Reference in New Issue
Block a user