Revert "gdbserver: When attaching, add process before lwps"

This reverts commit f084d33511.

Accidently pushed. Reverted.
This commit is contained in:
Alan Hayward 2019-01-28 16:21:00 +00:00
parent 453f8e1e49
commit 9ee1941355
1 changed files with 2 additions and 2 deletions

View File

@ -1188,8 +1188,6 @@ linux_attach (unsigned long pid)
ptid_t ptid = ptid_t (pid, pid, 0);
int err;
proc = linux_add_process (pid, 1);
/* Attach to PID. We will check for other threads
soon. */
err = linux_attach_lwp (ptid);
@ -1200,6 +1198,8 @@ linux_attach (unsigned long pid)
error ("Cannot attach to process %ld: %s", pid, reason.c_str ());
}
proc = linux_add_process (pid, 1);
/* Don't ignore the initial SIGSTOP if we just attached to this
process. It will be collected by wait shortly. */
initial_thread = find_thread_ptid (ptid_t (pid, pid, 0));