proot icon indicating copy to clipboard operation
proot copied to clipboard

"gdb -p" doesn't work with multi-threaded programs

Open cedric-vincent opened this issue 9 years ago • 0 comments

How to reproduce:

./src/proot bash -c 'tests/test-c47aeb7d & gdb -p $!'

where tests/test-c47aeb7d.c was modified this way:

 void *print_hello(void *id)
 {
+       sleep(999);
        pthread_exit(id);
 }

Expected result: gdb gives a prompt

Current result: gdb is stalled in the tracing-stop state.

Hypothetical fix: function attach_to_ptracer() should declare all threads from ptracee's thread group as attached by ptracer.

cedric-vincent avatar Dec 11 '14 11:12 cedric-vincent