diff --git a/strace.c b/strace.c index 250f49c2..f851c985 100644 --- a/strace.c +++ b/strace.c @@ -2311,9 +2311,10 @@ trace(void) return true; } - clear_regs(); if (WIFSTOPPED(status)) get_regs(pid); + else + clear_regs(); event = (unsigned int) status >> 16;