+2015-07-24 Yao Qi <yao.qi@linaro.org>
+
+ * linux-low.c (linux_add_process): Don't set
+ proc->priv->new_inferior.
+ (linux_create_inferior): Set proc->priv->new_inferior to 1.
+ (linux_attach): Likewise.
+
2015-07-24 Yao Qi <yao.qi@linaro.org>
* server.c (start_inferior): Code refactor.
proc = add_process (pid, attached);
proc->priv = xcalloc (1, sizeof (*proc->priv));
- /* Set the arch when the first LWP stops. */
- proc->priv->new_inferior = 1;
-
if (the_low_target.new_process != NULL)
proc->priv->arch_private = the_low_target.new_process ();
ptid_t ptid;
struct cleanup *restore_personality
= maybe_disable_address_space_randomization (disable_randomization);
+ struct process_info *proc;
#if defined(__UCLIBC__) && defined(HAS_NOMMU)
pid = vfork ();
do_cleanups (restore_personality);
- linux_add_process (pid, 0);
+ proc = linux_add_process (pid, 0);
+ /* Set the arch when the first LWP stops. */
+ proc->priv->new_inferior = 1;
ptid = ptid_build (pid, pid, 0);
new_lwp = add_lwp (ptid);
{
ptid_t ptid = ptid_build (pid, pid, 0);
int err;
+ struct process_info *proc;
/* Attach to PID. We will check for other threads
soon. */
error ("Cannot attach to process %ld: %s",
pid, linux_ptrace_attach_fail_reason_string (ptid, err));
- linux_add_process (pid, 1);
+ proc = linux_add_process (pid, 1);
+ /* Set the arch when the first LWP stops. */
+ proc->priv->new_inferior = 1;
if (!non_stop)
{