From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24925 invoked by alias); 1 Sep 2015 14:23:27 -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 24903 invoked by uid 89); 1 Sep 2015 14:23:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f48.google.com Received: from mail-pa0-f48.google.com (HELO mail-pa0-f48.google.com) (209.85.220.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 01 Sep 2015 14:23:25 +0000 Received: by pabzx8 with SMTP id zx8so178674536pab.1 for ; Tue, 01 Sep 2015 07:23:24 -0700 (PDT) X-Received: by 10.69.17.1 with SMTP id ga1mr3253052pbd.163.1441117403958; Tue, 01 Sep 2015 07:23:23 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id lq10sm18488887pab.18.2015.09.01.07.23.21 (version=TLS1_2 cipher=AES128-SHA256 bits=128/128); Tue, 01 Sep 2015 07:23:23 -0700 (PDT) From: Yao Qi To: Antoine Tremblay Cc: Yao Qi , Subject: Re: [PATCH 2/2] Support single step by arch or target 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> Date: Tue, 01 Sep 2015 14:23:00 -0000 In-Reply-To: <55E5A5A9.4030603@ericsson.com> (Antoine Tremblay's message of "Tue, 1 Sep 2015 09:18:33 -0400") Message-ID: <86h9nez0aa.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00011.txt.bz2 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. > >> --- 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 () =3D=3D 1) >> + return 0; >> + >> next_pc =3D arm_get_next_pc (frame, get_frame_pc (frame)); >> >> /* The Linux kernel offers some user-mode helpers in a high page. W= e 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. --=20 Yao (=E9=BD=90=E5=B0=A7)