From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +Ho0AxdE4GEqQwAAWB0awg (envelope-from ) for ; Thu, 13 Jan 2022 10:24:07 -0500 Received: by simark.ca (Postfix, from userid 112) id 0A7261F34E; Thu, 13 Jan 2022 10:24:07 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 54FED1ECEB for ; Thu, 13 Jan 2022 10:24:06 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CDEA53951C98 for ; Thu, 13 Jan 2022 15:24:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDEA53951C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1642087445; bh=1/6gKEmQvWtvKFWOtXxgbibdZ4NAFkJ4zzXfPVLKsZ4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Xvx9qQYB5p6h++DXZTqZ1a2suatxs9S1BYXPZMUC7rczWUY2gNBQKkIFwOCWn7RrM LI/J1Anc+UNhJNE48XY0Wv1Zc80X1DbxBvT5/5MFOvfrhJ6hJiGBfZ5J+sTdzDZmNs esjucuxxoio8t8QNxahZUjFaPfPkNXq2apP3Snjo= Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by sourceware.org (Postfix) with ESMTPS id 8A6B73951C74 for ; Thu, 13 Jan 2022 15:22:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8A6B73951C74 X-IronPort-AV: E=McAfee;i="6200,9189,10225"; a="330377388" X-IronPort-AV: E=Sophos;i="5.88,286,1635231600"; d="scan'208";a="330377388" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 07:22:01 -0800 X-IronPort-AV: E=Sophos;i="5.88,286,1635231600"; d="scan'208";a="670541953" Received: from labpc2315.iul.intel.com (HELO localhost) ([172.28.50.57]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 07:22:00 -0800 To: gdb-patches@sourceware.org Subject: [PATCH 3/3] gdb: Remove workaround for the vCont packet Date: Thu, 13 Jan 2022 16:21:18 +0100 Message-Id: <20220113152118.1465255-4-christina.schimpe@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220113152118.1465255-1-christina.schimpe@intel.com> References: <20220113152118.1465255-1-christina.schimpe@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Christina Schimpe via Gdb-patches Reply-To: Christina Schimpe Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" The workaround for the vCont packet is no longer required due to the former commit "gdb: Make global feature array a per-remote target array". The vCont packet is now checked once when the connection is started and the supported vCont actions are set to the target's remote state attribute. --- gdb/remote.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index a270cb688c..4024801559 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -422,9 +422,6 @@ class remote_state /* The status of the stub support for the various vCont actions. */ vCont_action_support supports_vCont; - /* Whether vCont support was probed already. This is a workaround - until packet_support is per-connection. */ - bool supports_vCont_probed; /* True if the user has pressed Ctrl-C, but the target hasn't responded to that. */ @@ -4859,6 +4856,10 @@ remote_target::start_remote_1 (int from_tty, int extended_p) which later probes to skip. */ remote_query_supported (); + /* Check vCont support and set the remote state's vCont_action_support + attribute. */ + remote_vcont_probe (); + /* If the stub wants to get a QAllow, compose one and send it. */ if (m_features.packet_support (PACKET_QAllow) != PACKET_DISABLE) set_permissions (); @@ -6378,7 +6379,6 @@ remote_target::remote_vcont_probe () } packet_ok (rs->buf, &m_features.m_protocol_packets[PACKET_vCont]); - rs->supports_vCont_probed = true; } /* Helper function for building "vCont" resumptions. Write a @@ -6568,9 +6568,6 @@ remote_target::remote_resume_with_vcont (ptid_t ptid, int step, if (::execution_direction == EXEC_REVERSE) return 0; - if (m_features.packet_support (PACKET_vCont) == PACKET_SUPPORT_UNKNOWN) - remote_vcont_probe (); - if (m_features.packet_support (PACKET_vCont) == PACKET_DISABLE) return 0; @@ -7112,12 +7109,6 @@ remote_target::remote_stop_ns (ptid_t ptid) } } - /* FIXME: This supports_vCont_probed check is a workaround until - packet_support is per-connection. */ - if (m_features.packet_support (PACKET_vCont) == PACKET_SUPPORT_UNKNOWN - || !rs->supports_vCont_probed) - remote_vcont_probe (); - if (!rs->supports_vCont.t) error (_("Remote server does not support stopping threads")); @@ -14516,9 +14507,6 @@ remote_target::can_do_single_step () { struct remote_state *rs = get_remote_state (); - if (m_features.packet_support (PACKET_vCont) == PACKET_SUPPORT_UNKNOWN) - remote_vcont_probe (); - return rs->supports_vCont.s && rs->supports_vCont.S; } else @@ -14801,9 +14789,6 @@ show_range_stepping (struct ui_file *file, int from_tty, bool remote_target::vcont_r_supported () { - if (m_features.packet_support (PACKET_vCont) == PACKET_SUPPORT_UNKNOWN) - remote_vcont_probe (); - return (m_features.packet_support (PACKET_vCont) == PACKET_ENABLE && get_remote_state ()->supports_vCont.r); } -- 2.25.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928