FreeBSD: Fix 'Couldn't get registers: Device busy' error (PR gdb/23077)
[deliverable/binutils-gdb.git] / gdb / remote.c
index f54a38833b30d090d46b186a0481c4276011dddf..49013848d5553dd1da0b014d3ef8001bfb65ca89 100644 (file)
@@ -5316,7 +5316,10 @@ extended_remote_attach (struct target_ops *target, const char *args,
       inferior_ptid = remote_current_thread (inferior_ptid);
 
       /* Add the main thread to the thread list.  */
-      add_thread_silent (inferior_ptid);
+      thread_info *thr = add_thread_silent (inferior_ptid);
+      /* Don't consider the thread stopped until we've processed the
+        saved stop reply.  */
+      set_executing (thr->ptid, true);
     }
 
   /* Next, if the target can specify a description, read it.  We do
This page took 0.025166 seconds and 4 git commands to generate.