From: Nick Roberts Date: Mon, 21 Aug 2006 10:22:31 +0000 (+0000) Subject: (inf_ptrace_target): Commit the changes described but X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2629c8290a7cbcc4f0d778c0853ac69adc1ace75;p=thirdparty%2Fbinutils-gdb.git (inf_ptrace_target): Commit the changes described but not committed on 2006-05-13. --- diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index 04e6d477d2c..69f62e38f0b 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -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. */