diff options
author | Pedro Alves <pedro@codesourcery.com> | 2008-09-08 21:22:48 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2008-09-08 21:22:48 +0000 |
commit | 957e114ba3c9e9586e6dcfbf76a1a93605a4c368 (patch) | |
tree | 3e543a4ae2953ef45d5de52bf809d16b464607a0 /gdb/fork-child.c | |
parent | 6c408e200cb2586bf640e7c8fc73afee2d586a8a (diff) | |
download | gdb-957e114ba3c9e9586e6dcfbf76a1a93605a4c368.tar.gz |
* linux-nat.c (linux_nat_wait): Update inferior_ptid's ptid with
thread_change_ptid. Don't add or mark the main thread as running
and executing here.
* fork-child.c (fork_inferior): Add the main thread here.
Diffstat (limited to 'gdb/fork-child.c')
-rw-r--r-- | gdb/fork-child.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 7aff110ba92..229770f154b 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -397,6 +397,12 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env, /* Needed for wait_for_inferior stuff below. */ inferior_ptid = pid_to_ptid (pid); + /* We have something that executes now. We'll be running through + the shell at this point, but the pid shouldn't change. Targets + supporting MT should fill this task's ptid with more data as soon + as they can. */ + add_thread_silent (inferior_ptid); + /* Now that we have a child process, make it our target, and initialize anything target-vector-specific that needs initializing. */ |