aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r--gdb/linux-nat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index fdd1ae4..e6d525f 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -1172,6 +1172,16 @@ attach_proc_task_lwp_callback (ptid_t ptid)
/* We need to wait for a stop before being able to make the
next ptrace call on this LWP. */
lp->must_set_ptrace_flags = 1;
+
+ /* So that wait collects the SIGSTOP. */
+ lp->resumed = 1;
+
+ /* Also add the LWP to gdb's thread list, in case a
+ matching libthread_db is not found (or the process uses
+ raw clone). */
+ add_thread (lp->ptid);
+ set_running (lp->ptid, 1);
+ set_executing (lp->ptid, 1);
}
return 1;