From patchwork Thu Dec 17 14:14:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Tremblay X-Patchwork-Id: 10052 Received: (qmail 20819 invoked by alias); 17 Dec 2015 14:15:37 -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 20780 invoked by uid 89); 17 Dec 2015 14:15:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=201504, 2015-04, Hx-languages-length:1630, 22909 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 (AES256-SHA encrypted) ESMTPS; Thu, 17 Dec 2015 14:15:34 +0000 Received: from EUSAAHC006.ericsson.se (Unknown_Domain [147.117.188.90]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id 9C.CB.06940.B82C2765; Thu, 17 Dec 2015 15:11:23 +0100 (CET) Received: from elxa4wqvvz1.dyn.mo.ca.am.ericsson.se (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.90) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 17 Dec 2015 09:14:56 -0500 From: Antoine Tremblay To: CC: Antoine Tremblay Subject: [PATCH v8 7/7] Enable conditional breakpoints for targets that support software single step in GDBServer Date: Thu, 17 Dec 2015 09:14:44 -0500 Message-ID: <1450361684-29536-8-git-send-email-antoine.tremblay@ericsson.com> In-Reply-To: <1450361684-29536-1-git-send-email-antoine.tremblay@ericsson.com> References: <1450361684-29536-1-git-send-email-antoine.tremblay@ericsson.com> MIME-Version: 1.0 X-IsSubscribed: yes 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. New tests passing : PASS: gdb.base/cond-eval-mode.exp: set breakpoint condition-evaluation target and related... 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(-) diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 8f097e5..b385afb 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -2290,13 +2290,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+");