public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: Remove workaround for the vCont packet
@ 2023-01-30 14:32 Christina Schimpe
  0 siblings, 0 replies; only message in thread
From: Christina Schimpe @ 2023-01-30 14:32 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=34f0de5a4acbd328f4a89ac1232aece6d8151b74

commit 34f0de5a4acbd328f4a89ac1232aece6d8151b74
Author: Christina Schimpe <christina.schimpe@intel.com>
Date:   Thu Dec 9 14:18:36 2021 +0100

    gdb: Remove workaround for the vCont packet
    
    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 */
 
   /* 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.  */
@@ -4949,6 +4946,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 ();
@@ -6465,7 +6466,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
@@ -6651,9 +6651,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;
 
@@ -7187,12 +7184,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"));
 
@@ -14514,9 +14505,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
@@ -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) == PACKET_SUPPORT_UNKNOWN)
-    remote_vcont_probe ();
-
   return (m_features.packet_support (PACKET_vCont) == PACKET_ENABLE
 	  && get_remote_state ()->supports_vCont.r);
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-30 14:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 14:32 [binutils-gdb] gdb: Remove workaround for the vCont packet Christina Schimpe

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).