> I'm thinking the right thing to do, here is to enhance select_event_lwp > to look for threads that received a fork/vfork event first, and report > that event to gdb ahead of all the other kinds of events. That seems to work well. Attached is the patch doing this. The commit's revision log gives I think a reasonable overview of what the issue is and how the patch fixes it. But more information that I found while I was investigating this which is only tangential to the issue can be found in the following message, exchanged on this list: https://www.sourceware.org/ml/gdb-patches/2016-05/msg00207.html https://www.sourceware.org/ml/gdb-patches/2016-05/msg00209.html https://www.sourceware.org/ml/gdb-patches/2016-06/msg00391.html gdb/gdbserver/ChangeLog: * linux-low.c (select_fork_vfork_lwp_callback): New function. (select_event_lwp): Give priority fork/vfork events over all other types of events. gdb/testsuite/ChangeLog: * gdb.ada/bp_and_fork: New test. Tested on x86_64-linux. OK to apply? Thanks! -- Joel