From patchwork Wed Aug 31 17:14:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Tremblay X-Patchwork-Id: 15134 Received: (qmail 117449 invoked by alias); 31 Aug 2016 17:14:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 117388 invoked by uid 89); 31 Aug 2016 17:14:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=letting X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Aug 2016 17:14:21 +0000 Received: from EUSAAHC008.ericsson.se (Unknown_Domain [147.117.188.96]) by (Symantec Mail Security) with SMTP id 38.5A.02488.AD117C75; Wed, 31 Aug 2016 19:20:27 +0200 (CEST) Received: from elxa4wqvvz1.dyn.mo.ca.am.ericsson.se (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.96) with Microsoft SMTP Server (TLS) id 14.3.301.0; Wed, 31 Aug 2016 13:14:13 -0400 From: Antoine Tremblay To: CC: Antoine Tremblay Subject: [PATCH 2/2] Enable range stepping for ARM on GDBServer Date: Wed, 31 Aug 2016 13:14:06 -0400 Message-ID: <20160831171406.24057-2-antoine.tremblay@ericsson.com> In-Reply-To: <20160831171406.24057-1-antoine.tremblay@ericsson.com> References: <20160831171406.24057-1-antoine.tremblay@ericsson.com> MIME-Version: 1.0 X-IsSubscribed: yes 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): 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,