> utrace_resume(UTRACE_REPORT) always calls utrace_reset() because > start_callback() obviously can't clear report->spurious when > event == 0. > > Change start_callback() to correctly clear ->spurious in this case.
Ok. > Note: utrace_control(DETACH) does utrace_do_stop() and sets UTRACE_REPORT > if the tracee is not stopped. It also does mark_engine_detached() which > does not set QUIESCE in target->utrace_flags. This means we rely on > report.spurious which should provoke utrace_reset() from utrace_resume() > if target->utrace_flags doesn't have QUIESCE. A bit too subtle, imho. Agreed. There is no reason utrace_control can't set it in utrace_flags in its !reset case. > Also, UTRACE_REPORT can be lost because of UTRACE_INTERRUPT or normal > signal: utrace_get_signal() checks "utrace_flags & UTRACE_EVENT(QUIESCE)" > and returns otherwise. This should be fixed somehow. This check is wrong > anyway, but it is not clear how we can fix the race with DETACH. I see. That would be fixed by utrace_control setting it. Thanks, Roland