From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by sourceware.org (Postfix) with ESMTPS id 9A82E3857373 for ; Fri, 9 Sep 2022 15:37:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A82E3857373 X-IronPort-AV: E=McAfee;i="6500,9779,10465"; a="280524141" X-IronPort-AV: E=Sophos;i="5.93,303,1654585200"; d="scan'208";a="280524141" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2022 08:37:53 -0700 X-IronPort-AV: E=Sophos;i="5.93,303,1654585200"; d="scan'208";a="592646609" Received: from labpc2315.iul.intel.com (HELO localhost) ([172.28.50.57]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2022 08:37:52 -0700 From: Christina Schimpe To: gdb-patches@sourceware.org Cc: pedro@palves.net, aburgess@redhat.com, eliz@gnu.org, tom@tromey.com, Christina Schimpe Subject: [PATCH v3 3/3] gdb: Remove workaround for the vCont packet Date: Fri, 9 Sep 2022 17:37:09 +0200 Message-Id: <20220909153709.3687178-4-christina.schimpe@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220909153709.3687178-1-christina.schimpe@intel.com> References: <20220909153709.3687178-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.3 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.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-List-Received-Date: Fri, 09 Sep 2022 15:37:56 -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 5e110014fed..bbc849bcdfe 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. */ @@ -4947,6 +4944,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 (); @@ -6466,7 +6467,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 @@ -6652,9 +6652,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; @@ -7188,12 +7185,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")); @@ -14590,9 +14581,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 @@ -14902,9 +14890,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