From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by sourceware.org (Postfix) with ESMTPS id 469C53888837 for ; Tue, 29 Mar 2022 13:12:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 469C53888837 X-IronPort-AV: E=McAfee;i="6200,9189,10300"; a="258075493" X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="258075493" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 06:12:39 -0700 X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="604771569" Received: from labpc2315.iul.intel.com (HELO localhost) ([172.28.50.57]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 06:12:38 -0700 From: Christina Schimpe To: gdb-patches@sourceware.org Subject: [PATCH v2 3/3] gdb: Remove workaround for the vCont packet Date: Tue, 29 Mar 2022 15:11:58 +0200 Message-Id: <20220329131158.3970228-4-christina.schimpe@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220329131158.3970228-1-christina.schimpe@intel.com> References: <20220329131158.3970228-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.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Tue, 29 Mar 2022 13:13:00 -0000 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 510af52c49..5536ce7be2 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. */ @@ -4934,6 +4931,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 (); @@ -6444,7 +6445,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 @@ -6634,9 +6634,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; @@ -7168,12 +7165,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")); @@ -14568,9 +14559,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 @@ -14853,9 +14841,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