From patchwork Wed Dec 21 13:39:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schimpe, Christina" X-Patchwork-Id: 62228 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DEA70385B51F for ; Wed, 21 Dec 2022 13:41:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DEA70385B51F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671630065; bh=p5KNEm4Vf7TC29nGnY6G23ffNRxT1pVzXlTXeMtb4Yk=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=KFm3wMl5EK5Yjo/oN/QCYkha4WGDhIk09WWJ0a8XmxZzGXk2d2yEM7K+uZLCo+czF uIotJgBKMnrkZULarPtpH4X8XMn77QjZivvTVkxzgLUCdzeI0Seic8T6v2nOSdTgfd Mv+8Vl0X0K4298TJVjE/G5eofyr619pbQAkmn0oQ= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org 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 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 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 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 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: , X-Patchwork-Original-From: Christina Schimpe via Gdb-patches From: "Schimpe, Christina" Reply-To: Christina Schimpe Errors-To: gdb-patches-bounces+patchwork=sourceware.org@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 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); }