Without this, early ptrace stops can be missed because they can happen before the call to uloop_init().
Signed-off-by: Michal Sojka <sojk...@fel.cvut.cz> --- trace/trace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trace/trace.c b/trace/trace.c index d022079..76b6b7f 100644 --- a/trace/trace.c +++ b/trace/trace.c @@ -342,6 +342,9 @@ int main(int argc, char **argv, char **envp) return -1; } + /* Initialize uloop to catch all ptrace stops from now on. */ + uloop_init(); + int ptrace_options = PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK | PTRACE_O_TRACECLONE; switch (mode) { case UTRACE: @@ -362,7 +365,6 @@ int main(int argc, char **argv, char **envp) return -1; } - uloop_init(); tracer.proc.pid = child; tracer.proc.cb = tracer_cb; uloop_process_add(&tracer.proc); -- 2.14.1 _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev