get_regs: guard against subsequent invocations
At this moment there is only one call to get_regs, but there is going to be more of them, so a guard is needed. This change also adds a clear_regs call before get_regs, which essentially reverts commit v4.9-288-ge9bfff6. * strace.c (trace): Call clear_regs before get_regs. * syscall.c (get_regs): Skip if get_regs_error != -1.
This commit is contained in:
parent
83265998b8
commit
13ffa22088
3
strace.c
3
strace.c
@ -2295,10 +2295,9 @@ trace(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
clear_regs();
|
||||
if (WIFSTOPPED(status))
|
||||
get_regs(pid);
|
||||
else
|
||||
clear_regs();
|
||||
|
||||
event = (unsigned int) status >> 16;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user