I guess my intent is clear, but just in case... the second patch
is the only change in ptrace.h we need and we can send it upstream
right now.


I am thinking how can we fix utrace_control(SINGLESTEP). I don't
have good ideas so far. But, perhaps we can add
utrace->please_enable_single_step:1 ?

        utrace_control()

                case UTRACE_RESUME:
                        if (likely(resume))
                                utrace->please_enable_single_step = 1;
        
utrace_stop() and utrace_finish_jctl() can check this flag after
wakeup

        if (unlikely(utrace->stopped)) {
                ...
        } esle if (utrace->please_enable_single_step) {
                user_enable_single_state(current);
                ...
        }

Or, we can use ENGINE_SINGLESTEP, which probably makes more sense.
Like ENGINE_STOP, it lives both in engine->flags and ->utrace_flags.


I no longer think utrace_control() should just turn SINGLESTEP into
REPORT silently.

Oleg.

Reply via email to