public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Antoine Tremblay <antoine.tremblay@ericsson.com>
Subject: [PATCH 2/2] Enable range stepping for ARM on GDBServer
Date: Wed, 31 Aug 2016 17:14:00 -0000	[thread overview]
Message-ID: <20160831171406.24057-2-antoine.tremblay@ericsson.com> (raw)
In-Reply-To: <20160831171406.24057-1-antoine.tremblay@ericsson.com>

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

  reply	other threads:[~2016-08-31 17:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 17:14 [PATCH 1/2] Fix lwp_suspend/unsuspend imbalance in linux_wait_1 Antoine Tremblay
2016-08-31 17:14 ` Antoine Tremblay [this message]
2016-08-31 17:50   ` [PATCH 2/2] Enable range stepping for ARM on GDBServer Pedro Alves
2016-08-31 18:15     ` Antoine Tremblay
2016-08-31 18:39       ` Pedro Alves
2016-08-31 19:14         ` Antoine Tremblay
2016-09-01 13:37           ` Pedro Alves
2016-09-01 15:21             ` Antoine Tremblay
2016-09-01 15:59               ` Pedro Alves
2016-09-01 16:44                 ` Yao Qi
2016-09-01 17:02                   ` Pedro Alves
2016-09-01 17:06                   ` Antoine Tremblay
2016-09-01 16:46                 ` Antoine Tremblay
2016-09-18 19:58         ` Yao Qi
2016-08-31 17:40 ` [PATCH 1/2] Fix lwp_suspend/unsuspend imbalance in linux_wait_1 Pedro Alves
2016-08-31 17:50   ` Antoine Tremblay
2016-08-31 17:52     ` Pedro Alves
2016-08-31 18:25       ` Antoine Tremblay
2016-08-31 19:16         ` Antoine Tremblay
2016-09-01 13:09           ` Pedro Alves
2016-09-01 15:12             ` Antoine Tremblay

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=20160831171406.24057-2-antoine.tremblay@ericsson.com \
    --to=antoine.tremblay@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    /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).