syscall: move get_regs call from syscall_exiting_decode to get_syscall_result
This make the code less confusing and opens the way for future changes related to get_regs. * syscall.c (syscall_exiting_decode): Move get_regs invocation ... (get_syscall_result) [ptrace_getregset_or_getregs]: ... here.
This commit is contained in:
parent
1f0803c366
commit
f05ea48c0a
@ -755,7 +755,7 @@ syscall_exiting_decode(struct tcb *tcp, struct timeval *ptv)
|
||||
update_personality(tcp, tcp->currpers);
|
||||
#endif
|
||||
|
||||
return get_regs(tcp->pid) < 0 ? -1 : get_syscall_result(tcp);
|
||||
return get_syscall_result(tcp);
|
||||
}
|
||||
|
||||
int
|
||||
@ -1236,7 +1236,10 @@ static int get_syscall_result_regs(struct tcb *);
|
||||
static int
|
||||
get_syscall_result(struct tcb *tcp)
|
||||
{
|
||||
#ifndef ptrace_getregset_or_getregs
|
||||
#ifdef ptrace_getregset_or_getregs
|
||||
if (get_regs(tcp->pid) < 0)
|
||||
return -1;
|
||||
#else
|
||||
if (get_syscall_result_regs(tcp))
|
||||
return -1;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user