[10/10] Enable conditional breakpoints for targets that support software single step in GDBServer.

Message ID 1446138583-13268-11-git-send-email-antoine.tremblay@ericsson.com
State New, archived
Headers

Commit Message

Antoine Tremblay Oct. 29, 2015, 5:09 p.m. UTC
  This patch enables support for conditional breakpoints if the target supports
software single step.

This was disabled before as the implementations of software single step were too
simple as discussed in
https://sourceware.org/ml/gdb-patches/2015-04/msg01110.html.

Since these issues are now fixed support can be added back.

No regressions, tested on ubuntu 14.04 ARMv7 and x86.
With gdbserver-{native,extended} / { -marm -mthumb }

gdb/gdbserver/ChangeLog:

	* server.c (handle_query): Call target_supports_software_single_step.
---
 gdb/gdbserver/server.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
  

Comments

Pedro Alves Nov. 4, 2015, 6:58 p.m. UTC | #1
On 10/29/2015 05:09 PM, Antoine Tremblay wrote:

>  
> -      if (target_supports_hardware_single_step ())
> +      if (target_supports_hardware_single_step () ||
> +	  target_supports_software_single_step () )

|| on the next line.

Otherwise LGTM.

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 3232da1..2ce2104 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -2210,13 +2210,9 @@  handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
 	  strcat (own_buf, ";tracenz+");
 	}
 
-      if (target_supports_hardware_single_step ())
+      if (target_supports_hardware_single_step () ||
+	  target_supports_software_single_step () )
 	{
-	  /* Support target-side breakpoint conditions and commands.
-	     GDBserver needs to step over the breakpoint if the condition
-	     is false.  GDBserver software single step is too simple, so
-	     disable conditional breakpoints if the target doesn't have
-	     hardware single step.  */
 	  strcat (own_buf, ";ConditionalBreakpoints+");
 	}
       strcat (own_buf, ";BreakpointCommands+");