From patchwork Wed May 16 14:18:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 27292 Received: (qmail 16704 invoked by alias); 16 May 2018 14:28:00 -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 16676 invoked by uid 89); 16 May 2018 14:27:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 May 2018 14:27:58 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 80B04BB400 for ; Wed, 16 May 2018 14:18:35 +0000 (UTC) Received: from localhost.localdomain (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 333391002948 for ; Wed, 16 May 2018 14:18:35 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 06/10] remote: Small cleanup in compare_section_command Date: Wed, 16 May 2018 15:18:26 +0100 Message-Id: <20180516141830.16859-7-palves@redhat.com> In-Reply-To: <20180516141830.16859-1-palves@redhat.com> References: <20180516141830.16859-1-palves@redhat.com> The set_general_process call in compare_sections_command isn't actually needed. remote_target::verify_memory and remote_target::xfer_partial already handle making sure the remote is pointing at the right process or thread. Getting this out of the way helps a bit with further elimination of the remote_state global, because we have to handle the case of a user invoking the command even if not connect to a remote target. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * remote.c (compare_section_command): Remove set_general_process call. --- gdb/remote.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index 8e1baf0856..ef15eafe2a 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -10511,9 +10511,6 @@ compare_sections_command (const char *args, int from_tty) if (!exec_bfd) error (_("command cannot be used without an exec file")); - /* Make sure the remote is pointing at the right process. */ - set_general_process (); - if (args != NULL && strcmp (args, "-r") == 0) { read_only = 1;