From: Christina Schimpe <christina.schimpe@intel.com>
To: gdb-patches@sourceware.org
Cc: pedro@palves.net, aburgess@redhat.com, eliz@gnu.org,
tom@tromey.com, Christina Schimpe <christina.schimpe@intel.com>
Subject: [PATCH v3 3/3] gdb: Remove workaround for the vCont packet
Date: Fri, 9 Sep 2022 17:37:09 +0200 [thread overview]
Message-ID: <20220909153709.3687178-4-christina.schimpe@intel.com> (raw)
In-Reply-To: <20220909153709.3687178-1-christina.schimpe@intel.com>
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 <http://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
next prev parent reply other threads:[~2022-09-09 15:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 15:37 [PATCH v3 0/3] Apply fixme notes for multi-target support Christina Schimpe
2022-09-09 15:37 ` [PATCH v3 1/3] gdb: Make global feature array a per-remote target array Christina Schimpe
2022-10-04 13:48 ` Pedro Alves
2022-10-18 10:26 ` Schimpe, Christina
2022-09-09 15:37 ` [PATCH v3 2/3] gdb: Add per-remote target variables for memory read and write config Christina Schimpe
2022-09-09 15:57 ` Eli Zaretskii
2022-09-09 15:37 ` Christina Schimpe [this message]
2022-12-20 20:29 ` [PATCH v3 3/3] gdb: Remove workaround for the vCont packet Tom Tromey
2022-12-21 7:42 ` Schimpe, Christina
2022-10-04 12:40 ` [PING][PATCH v3 0/3] Apply fixme notes for multi-target support Schimpe, Christina
2022-10-04 12:40 ` Schimpe, Christina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220909153709.3687178-4-christina.schimpe@intel.com \
--to=christina.schimpe@intel.com \
--cc=aburgess@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).