This is the mail archive of the gdb-patches@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]

[PATCH 2/2] Enable range stepping for ARM on GDBServer


This patch enables range stepping to be done in GDBServer with an ARM
target.

There is one problem however with the gdb.threads/non-stop-fair-events.exp
test.

Since single stepping is done in software and that displaced stepping is
not supported, threads end up hitting each others breakpoints and the main
thread can't make any progress passed a number of threads on my system.

Thus we get:
FAIL: gdb.threads/non-stop-fair-events.exp: signal_thread=5: thread 1
broke out of loop (timeout)

Note that even letting it go an hour doesn't help so bumping the timeout
is out of the question.

I'm not sure what to do about this one ? kfail ? ideas ?

No regressions, tested on ubuntu 14.04 ARMv7 and x86.
With gdbserver-native.

gdb/gdbserver/ChangeLog:

	* linux-arm-low.c (arm_supports_range_stepping): New function.
	(linux_target_ops the_low_target)<supports_range_stepping>: Initialize.
---
 gdb/gdbserver/linux-arm-low.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index e1261e5..cadda98 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -943,6 +943,14 @@ arm_gdbserver_get_next_pcs (struct regcache *regcache)
   return next_pcs;
 }
 
+/* Support for range stepping.  */
+
+static int
+arm_supports_range_stepping (void)
+{
+  return 1;
+}
+
 /* Support for hardware single step.  */
 
 static int
@@ -1063,7 +1071,7 @@ struct linux_target_ops the_low_target = {
   NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
   NULL, /* get_min_fast_tracepoint_insn_len */
-  NULL, /* supports_range_stepping */
+  arm_supports_range_stepping, /* supports_range_stepping */
   arm_breakpoint_kind_from_current_state,
   arm_supports_hardware_single_step,
   arm_get_syscall_trapinfo,
-- 
2.9.2


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