From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by sourceware.org (Postfix) with ESMTPS id 13C913858298 for ; Wed, 21 Dec 2022 13:40:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 13C913858298 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671630043; x=1703166043; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bNsR7b+IS0rqxkblFNXa2rMq5DIoYCO+uFinv6sqZTE=; b=SM/aoLIDaCiMxTqTd/eUDORe8mR1a4xaZbQKtZ5Ymg29SRO0BLZIF0/u Yn6jr8oW4LqCWoV44hc4DtWItFpWgRPLVqfFx+gBcu4JB3hC2SVEzMWMg WFVn6H19gwkUzzFKI5lChqnkRgC28nUkuVoZmv11Mj2jlHgewEsnWHszC 84tmT3kd8cX9lbY+p4ikMrRhB3XoBwuztMaLrWnNg9WuDq+74H8b225b7 eUuNZH/TqAAmNG2dOH6dBjPntBZnkIetCpAlzI2qMDfA9wvX8IckKR8AX 9Fh82vvoEiDjuArEHeEtKKC/uQvuQWLWtP+x3jDNHJRMtLzQ8fSFJ3bV7 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="307551860" X-IronPort-AV: E=Sophos;i="5.96,262,1665471600"; d="scan'208";a="307551860" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2022 05:40:42 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="740172250" X-IronPort-AV: E=Sophos;i="5.96,262,1665471600"; d="scan'208";a="740172250" Received: from labpc2315.iul.intel.com (HELO localhost) ([172.28.50.57]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2022 05:40:40 -0800 From: Christina Schimpe To: gdb-patches@sourceware.org Cc: tom@tromey.com, pedro@palves.net, aburgess@redhat.com, eliz@gnu.org, Christina Schimpe Subject: [PATCH v4 3/3] gdb: Remove workaround for the vCont packet Date: Wed, 21 Dec 2022 14:39:58 +0100 Message-Id: <20221221133958.2111768-4-christina.schimpe@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221221133958.2111768-1-christina.schimpe@intel.com> References: <20221221133958.2111768-1-christina.schimpe@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 8042446ac3d..71ba7da231a 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -455,9 +455,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. */ @@ -4951,6 +4948,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 (); @@ -6467,7 +6468,6 @@ remote_target::remote_vcont_probe () } m_features.packet_ok (rs->buf, PACKET_vCont); - rs->supports_vCont_probed = true; } /* Helper function for building "vCont" resumptions. Write a @@ -6653,9 +6653,6 @@ remote_target::remote_resume_with_vcont (ptid_t scope_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; @@ -7189,12 +7186,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 @@ -14827,9 +14815,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