This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Support vCont s and S actions with software single step


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

commit 21536b367ce73eed103e1389b5f45010f0c96bbb
Author: Yao Qi <yao.qi@linaro.org>
Date:   Thu Jul 21 12:12:18 2016 +0100

    Support vCont s and S actions with software single step
    
    GDBserver with software single step should be able to claim supporting
    vCont s and S actions, so that GDB knows the remote target can do
    single step.  It doesn't matter to GDB that the single step in the
    remote target is done via hardware or software.
    
    gdb/gdbserver:
    
    2016-07-21  Yao Qi  <yao.qi@linaro.org>
    
    	* server.c (handle_v_requests): Support s and S actions
    	if target_supports_software_single_step return true.

Diff:
---
 gdb/gdbserver/ChangeLog |  5 +++++
 gdb/gdbserver/server.c  | 13 ++++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index e55bae0..1592a11 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,10 @@
 2016-07-21  Yao Qi  <yao.qi@linaro.org>
 
+	* server.c (handle_v_requests): Support s and S actions
+	if target_supports_software_single_step return true.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
 	* linux-low.c (resume_stopped_resumed_lwps): If resume request
 	is resume_step, call maybe_hw_step.
 	(linux_wait_1): Stop all threads, remove reinsert breakpoints,
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 18517bc..6d6cb09 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -2958,12 +2958,15 @@ handle_v_requests (char *own_buf, int packet_len, int *new_packet_len)
 	{
 	  strcpy (own_buf, "vCont;c;C;t");
 
-	  if (target_supports_hardware_single_step () || !vCont_supported)
+	  if (target_supports_hardware_single_step ()
+	      || target_supports_software_single_step ()
+	      || !vCont_supported)
 	    {
-	      /* If target supports hardware single step, add actions s
-		 and S to the list of supported actions.  On the other
-		 hand, if GDB doesn't request the supported vCont actions
-		 in qSupported packet, add s and S to the list too.  */
+	      /* If target supports single step either by hardware or by
+		 software, add actions s and S to the list of supported
+		 actions.  On the other hand, if GDB doesn't request the
+		 supported vCont actions in qSupported packet, add s and
+		 S to the list too.  */
 	      own_buf = own_buf + strlen (own_buf);
 	      strcpy (own_buf, ";s;S");
 	    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]