From patchwork Mon Jul 20 11:35:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 7753 Received: (qmail 104967 invoked by alias); 20 Jul 2015 11:36:02 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 104917 invoked by uid 89); 20 Jul 2015 11:36:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f174.google.com Received: from mail-pd0-f174.google.com (HELO mail-pd0-f174.google.com) (209.85.192.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 20 Jul 2015 11:35:59 +0000 Received: by pdrg1 with SMTP id g1so100634092pdr.2 for ; Mon, 20 Jul 2015 04:35:57 -0700 (PDT) X-Received: by 10.66.102.41 with SMTP id fl9mr58943017pab.93.1437392157129; Mon, 20 Jul 2015 04:35:57 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id db1sm21335338pdb.50.2015.07.20.04.35.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jul 2015 04:35:56 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 8/8] Remove proc->priv->new_inferior Date: Mon, 20 Jul 2015 12:35:26 +0100 Message-Id: <1437392126-29503-9-git-send-email-yao.qi@linaro.org> In-Reply-To: <1437392126-29503-1-git-send-email-yao.qi@linaro.org> References: <1437392126-29503-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes As the result of the previous patch, new_inferior is no longer used. This patch is to remove it. gdb/gdbserver: 2015-07-16 Yao Qi * linux-low.c (linux_create_inferior): Remove setting to proc->priv->new_inferior. (linux_attach): Likewise. (linux_low_filter_event): Likewise. * linux-low.h (struct process_info_private) : Remove. --- gdb/gdbserver/linux-low.c | 12 ++---------- gdb/gdbserver/linux-low.h | 5 ----- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 10942c8..3275576 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -763,7 +763,6 @@ linux_create_inferior (char *program, char **allargs) 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 (); @@ -811,9 +810,7 @@ linux_create_inferior (char *program, char **allargs) do_cleanups (restore_personality); - proc = linux_add_process (pid, 0); - /* Set the arch when the first LWP stops. */ - proc->priv->new_inferior = 1; + linux_add_process (pid, 0); ptid = ptid_build (pid, pid, 0); new_lwp = add_lwp (ptid); @@ -967,7 +964,6 @@ linux_attach (unsigned long pid) { ptid_t ptid = ptid_build (pid, pid, 0); int err; - struct process_info *proc; /* Attach to PID. We will check for other threads soon. */ @@ -976,9 +972,7 @@ linux_attach (unsigned long pid) error ("Cannot attach to process %ld: %s", pid, linux_ptrace_attach_fail_reason_string (ptid, err)); - proc = linux_add_process (pid, 1); - /* Set the arch when the first LWP stops. */ - proc->priv->new_inferior = 1; + linux_add_process (pid, 1); if (!non_stop) { @@ -2130,8 +2124,6 @@ linux_low_filter_event (int lwpid, int wstat) the_low_target.arch_setup (); current_thread = saved_thread; - - proc->priv->new_inferior = 0; } else { diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h index 3300da9..5a3697b 100644 --- a/gdb/gdbserver/linux-low.h +++ b/gdb/gdbserver/linux-low.h @@ -115,11 +115,6 @@ struct process_info_private /* &_r_debug. 0 if not yet determined. -1 if no PT_DYNAMIC in Phdrs. */ CORE_ADDR r_debug; - - /* This flag is true iff we've just created or attached to the first - LWP of this process but it has not stopped yet. As soon as it - does, we need to call the low target's arch_setup callback. */ - int new_inferior; }; struct lwp_info;