From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98630 invoked by alias); 1 Sep 2015 15:30: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 98611 invoked by uid 89); 1 Sep 2015 15:30:17 -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 X-HELO: usevmg20.ericsson.net Received: from usevmg20.ericsson.net (HELO usevmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 01 Sep 2015 15:30:11 +0000 Received: from EUSAAHC005.ericsson.se (Unknown_Domain [147.117.188.87]) by usevmg20.ericsson.net (Symantec Mail Security) with SMTP id 9F.DA.32596.B7665E55; Tue, 1 Sep 2015 10:49:00 +0200 (CEST) Received: from [142.133.110.95] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.89) with Microsoft SMTP Server id 14.3.248.2; Tue, 1 Sep 2015 11:30:05 -0400 Subject: Re: [PATCH 2/2] Support single step by arch or target To: Yao Qi References: <1441096915-23615-1-git-send-email-yao.qi@linaro.org> <1441096915-23615-3-git-send-email-yao.qi@linaro.org> <55E5A5A9.4030603@ericsson.com> <86h9nez0aa.fsf@gmail.com> CC: From: Antoine Tremblay Message-ID: <55E5C479.6020406@ericsson.com> Date: Tue, 01 Sep 2015 15:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <86h9nez0aa.fsf@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00015.txt.bz2 On 09/01/2015 10:23 AM, Yao Qi wrote: > Antoine Tremblay writes: > >> Could we name this can_hardware_single_step instead ? Since the target >> may be able to software single step (in gdbserver). And thus it would >> be confusing...It would also be more consistent with the >> supports_hardware_single_step hook ? >> > > If GDBserver can do software single step, this hook should return true > as well. Hardware single step and software single step in GDBserver > should make no difference to GDB. > OK right indeed, >> >>> --- a/gdb/arm-linux-tdep.c >>> +++ b/gdb/arm-linux-tdep.c >>> @@ -917,6 +917,11 @@ arm_linux_software_single_step (struct frame_info *frame) >>> if (arm_deal_with_atomic_sequence (frame)) >>> return 1; >>> >>> + /* If the target does have hardware single step, GDB doesn't have >>> + to bother software single step. */ >>> + if (target_can_do_single_step () == 1) >>> + return 0; >>> + >>> next_pc = arm_get_next_pc (frame, get_frame_pc (frame)); >>> >>> /* The Linux kernel offers some user-mode helpers in a high page. We can >> >> target_can_do_single_step () should be before >> arm_deal_with_atomic_sequence ... > > I am not sure we can do single step (via hardware and linux kernel) > for arm atomic sequence , but we can't do that for aarch64, see > aarch64-tdep.c:aarch64_software_single_step. > I see, thanks for the clarification.