From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7869) id DD1F53858D28; Mon, 30 Jan 2023 14:32:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD1F53858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675089173; bh=7f8msTfxIgAzVdpJW5QiAI8JnqSCllXyTWiWorWw+IQ=; h=From:To:Subject:Date:From; b=A8C8+6NAyezN1oAdrnZu0rc/d+/2GmN6/SNN6Q0NjdNh5pkd+Ns/dtct9B2b7FMly z6owX0bo4KsVCxqfgpP/ntXEaabvHIsUKspNoRhGOiolTPOzB6c/IOB72ffsiNlJ5a +F28ISwDAF0MCXFhbcMfmUFlagmssL4owTJ7hGjg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Christina Schimpe To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: Remove workaround for the vCont packet X-Act-Checkin: binutils-gdb X-Git-Author: Christina Schimpe X-Git-Refname: refs/heads/master X-Git-Oldrev: fe4c3ca0036b37ea43be1c36728b323f195ef1bb X-Git-Newrev: 34f0de5a4acbd328f4a89ac1232aece6d8151b74 Message-Id: <20230130143253.DD1F53858D28@sourceware.org> Date: Mon, 30 Jan 2023 14:32:53 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D34f0de5a4acb= d328f4a89ac1232aece6d8151b74 commit 34f0de5a4acbd328f4a89ac1232aece6d8151b74 Author: Christina Schimpe Date: Thu Dec 9 14:18:36 2021 +0100 gdb: Remove workaround for the vCont packet =20 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. Diff: --- gdb/remote.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index 9f78d359542..ba7a7520cb4 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -454,9 +454,6 @@ public: /* data */ =20 /* 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; =20 /* True if the user has pressed Ctrl-C, but the target hasn't responded to that. */ @@ -4949,6 +4946,10 @@ remote_target::start_remote_1 (int from_tty, int ext= ended_p) which later probes to skip. */ remote_query_supported (); =20 + /* 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) !=3D PACKET_DISABLE) set_permissions (); @@ -6465,7 +6466,6 @@ remote_target::remote_vcont_probe () } =20 m_features.packet_ok (rs->buf, PACKET_vCont); - rs->supports_vCont_probed =3D true; } =20 /* Helper function for building "vCont" resumptions. Write a @@ -6651,9 +6651,6 @@ remote_target::remote_resume_with_vcont (ptid_t scope= _ptid, int step, if (::execution_direction =3D=3D EXEC_REVERSE) return 0; =20 - if (m_features.packet_support (PACKET_vCont) =3D=3D PACKET_SUPPORT_UNKNO= WN) - remote_vcont_probe (); - if (m_features.packet_support (PACKET_vCont) =3D=3D PACKET_DISABLE) return 0; =20 @@ -7187,12 +7184,6 @@ remote_target::remote_stop_ns (ptid_t ptid) } } =20 - /* FIXME: This supports_vCont_probed check is a workaround until - packet_support is per-connection. */ - if (m_features.packet_support (PACKET_vCont) =3D=3D PACKET_SUPPORT_UNKNO= WN - || !rs->supports_vCont_probed) - remote_vcont_probe (); - if (!rs->supports_vCont.t) error (_("Remote server does not support stopping threads")); =20 @@ -14514,9 +14505,6 @@ remote_target::can_do_single_step () { struct remote_state *rs =3D get_remote_state (); =20 - if (m_features.packet_support (PACKET_vCont) =3D=3D PACKET_SUPPORT_U= NKNOWN) - remote_vcont_probe (); - return rs->supports_vCont.s && rs->supports_vCont.S; } else @@ -14825,9 +14813,6 @@ show_range_stepping (struct ui_file *file, int from= _tty, bool remote_target::vcont_r_supported () { - if (m_features.packet_support (PACKET_vCont) =3D=3D PACKET_SUPPORT_UNKNO= WN) - remote_vcont_probe (); - return (m_features.packet_support (PACKET_vCont) =3D=3D PACKET_ENABLE && get_remote_state ()->supports_vCont.r); }