diff options
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 6d56f19..f09a06e 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -6166,7 +6166,12 @@ remove_new_fork_children (struct threads_listing_context *context) fork child threads from the CONTEXT list. */ ALL_NON_EXITED_THREADS (thread) { - struct target_waitstatus *ws = &thread->pending_follow; + struct target_waitstatus *ws; + + if (thread->suspend.waitstatus_pending_p) + ws = &thread->suspend.waitstatus; + else + ws = &thread->pending_follow; if (is_pending_fork_parent (ws, pid, thread->ptid)) { |