diff options
author | Kevin Buettner <kevinb@redhat.com> | 2001-05-04 04:15:33 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2001-05-04 04:15:33 +0000 |
commit | 39f770628a4eaf018fec8d55684bf2ec16ada9cc (patch) | |
tree | 69027cfb7df2ecc521ab2cc1d25a7dd6cbe56632 /gdb/fork-child.c | |
parent | b1af961c8433821f61dd1849cff9eb9a8bb974e8 (diff) | |
download | gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.zip gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.gz gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.bz2 |
Phase 1 of the ptid_t changes.
Diffstat (limited to 'gdb/fork-child.c')
-rw-r--r-- | gdb/fork-child.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 1c19b83..de148c6 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -89,7 +89,7 @@ breakup_args (char *scratch, char **argv) } -/* Start an inferior Unix child process and sets inferior_pid to its pid. +/* Start an inferior Unix child process and sets inferior_ptid to its pid. EXEC_FILE is the file to run. ALLARGS is a string containing the arguments to the program. ENV is the environment vector to pass. SHELL_FILE is the shell file, @@ -355,7 +355,7 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env, init_thread_list (); - inferior_pid = pid; /* Needed for wait_for_inferior stuff below */ + inferior_ptid = pid_to_ptid (pid); /* Needed for wait_for_inferior stuff below */ /* Now that we have a child process, make it our target, and initialize anything target-vector-specific that needs initializing. */ @@ -462,7 +462,7 @@ clone_and_follow_inferior (int child_pid, int *followed_child) sleep (debug_fork); /* The child (i.e., the cloned debugger) must now attach to - CHILD_PID. inferior_pid is presently set to the parent process + CHILD_PID. inferior_ptid is presently set to the parent process of the fork, while CHILD_PID should be the child process of the fork. @@ -471,10 +471,10 @@ clone_and_follow_inferior (int child_pid, int *followed_child) */ read (handoff_semaphore[SEM_LISTEN], &listen_value, sizeof (listen_value)); - /* Note that we DON'T want to actually detach from inferior_pid, + /* Note that we DON'T want to actually detach from inferior_ptid, because that would allow it to run free. The original debugger wants to retain control of the process. So, we - just reset inferior_pid to CHILD_PID, and then ensure that all + just reset inferior_ptid to CHILD_PID, and then ensure that all breakpoints are really set in CHILD_PID. */ target_mourn_inferior (); |