]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
(inf_ptrace_target): Commit the changes described but
authorNick Roberts <nickrob@snap.net.nz>
Mon, 21 Aug 2006 10:22:31 +0000 (10:22 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Mon, 21 Aug 2006 10:22:31 +0000 (10:22 +0000)
not committed on 2006-05-13.

gdb/inf-ptrace.c

index 04e6d477d2c027de44657ccc6603a06085c2ace9..69f62e38f0b1f769df1d0d3b810802e838555887 100644 (file)
@@ -27,6 +27,8 @@
 #include "inflow.h"
 #include "gdbcore.h"
 #include "regcache.h"
+#include "inf-loop.h"
+#include "async-nat-inferior.h"
 
 #include "gdb_assert.h"
 #include "gdb_string.h"
@@ -116,6 +118,19 @@ inf_ptrace_him (int pid)
 
   target_acknowledge_created_inferior (pid);
 
+  if (target_can_async_p ())
+    {
+      gdb_create_inferior (gdb_status, pid);
+
+      gdb_signal_thread_create (&gdb_status->signal_status, pid);
+
+      gdb_status->attached_in_ptrace = 1;
+      gdb_status->stopped_in_ptrace = 0;
+      gdb_status->stopped_in_softexc = 0;
+
+      gdb_status->suspend_count = 0;
+    }
+
   /* START_INFERIOR_TRAPS_EXPECTED is defined in inferior.h, and will
      be 1 or 2 depending on whether we're starting without or with a
      shell.  */