From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89909 invoked by alias); 4 Nov 2015 18:47:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 88946 invoked by uid 89); 4 Nov 2015 18:47:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 04 Nov 2015 18:47:16 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id ECDD93674D7; Wed, 4 Nov 2015 18:47:14 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA4IlDv8029119; Wed, 4 Nov 2015 13:47:13 -0500 Message-ID: <563A52B0.9090205@redhat.com> Date: Wed, 04 Nov 2015 18:47:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Antoine Tremblay , gdb-patches@sourceware.org Subject: Re: [PATCH 03/10] Refactor queries for hardware and software single stepping support in GDBServer. References: <1446138583-13268-1-git-send-email-antoine.tremblay@ericsson.com> <1446138583-13268-4-git-send-email-antoine.tremblay@ericsson.com> In-Reply-To: <1446138583-13268-4-git-send-email-antoine.tremblay@ericsson.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg00153.txt.bz2 On 10/29/2015 05:09 PM, Antoine Tremblay wrote: > Before this patch there was only one call: can_hardware_single_step. Its > implementation was a check on breakpoint_reinsert_addr if NULL it assumed > that the target could hardware single step. > > This patch prepares for the case where this is not true anymore. > > In order to improve software single stepping in GDBServer the > breakpoint_reinsert_addr operation of targets that had a very simple > software implementation used only for stepping over thread creation events > will be removed. > > This will create a case where a target does not support hardware single > step and has the operation breakpoint_reinsert_addr set to NULL, thus > can_hardware_single_step needs to be implemented another way. > > A new target operation supports_hardware_single_step is introduced and is > to return true if the target does support such a feature, support for the > feature is manually hardcoded. > > Note that the hardware single step support was enabled as per the current > behavior, I did not check if tile for example really has ptrace singlestep > support but since the current implementation assumed it had, I kept it > that way. > > No regressions on Ubuntu 14.04 on ARMv7 and x86. > With gdbserver-{native,extended} / { -marm -mthumb } > > Compilation tested on: aarch64,arm,bfind,crisv32,m32r,ppc,s390,tic6x,tile, > xtensa. > Not tested : sh. > > gdb/gdbserver/ChangeLog: > > * linux-aarch64-low.c (aarch64_supports_hardware_single_step): > New function. > (struct linux_target_ops) : Initialize. > * linux-arm-low.c (arm_supports_hardware_single_step): New function. > (struct linux_target_ops) : Initialize. > * linux-bfin-low.c (bfin_supports_hardware_single_step): New function. > (struct linux_target_ops) : > Initialize. > * linux-crisv32-low.c (cris_supports_hardware_single_step): > New function. > (struct linux_target_ops) : Initialize. > * linux-low.c (can_hardware_single_step): Use > supports_hardware_single_step. > (can_software_single_step): New function. > (start_step_over): Call can_software_single_step. > (linux_supports_hardware_single_step): New function. > (struct target_ops) : Initialize. > * linux-low.h (struct linux_target_ops) > : Initialize. > * linux-m32r-low.c (m32r_supports_hardware_single_step): New function. > (struct linux_target_ops) : Initialize. > * linux-ppc-low.c (ppc_supports_hardware_single_step): New function. > (struct linux_target_ops) Initialize. > * linux-s390-low.c (s390_supports_hardware_single_step): New function. > (struct linux_target_ops) : Initialize. > * linux-sh-low.c (sh_supports_hardware_single_step): New function. > (struct linux_target_ops) : Initialize. > * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function. > (struct linux_target_ops) : > Initialize. > * linux-tile-low.c (tile_supports_hardware_single_step): New function. > (struct linux_target_ops) : > Initialize. > * linux-x86-low.c (x86_supports_hardware_single_step) New function. > (struct linux_target_ops) : Initialize. > * linux-xtensa-low.c (xtensa_supports_hardware_single_step): > New function. > (struct linux_target_ops) : Initialize. > * target.h (struct target_ops): : > New field. > (target_supports_software_single_step): New macro. LGTM. Thanks, Pedro Alves