From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95838 invoked by alias); 18 Mar 2016 14:25:10 -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 95814 invoked by uid 89); 18 Mar 2016 14:25:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*RU:209.85.192.195, Hx-spam-relays-external:209.85.192.195, destinations X-HELO: mail-pf0-f195.google.com Received: from mail-pf0-f195.google.com (HELO mail-pf0-f195.google.com) (209.85.192.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 18 Mar 2016 14:25:02 +0000 Received: by mail-pf0-f195.google.com with SMTP id q129so17447057pfb.3 for ; Fri, 18 Mar 2016 07:25:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=cjAsyWztPDn9zPbMgoy3aUtIzo6Vve/MSpFOeJoJZWs=; b=FNZoipYBAfpyxcirqgf9awc+pydow1I1P/utWBzafIkmrEkPfjMDfNfMFEgTaKKadg v/PRU0mlU1p5KlFDsBH17Qd/++EQHv5ezRa0IRPJqU8/VzpcaIGD6JgQXwqxtAapUdEI YUnNIO+4EwLFDjWwcSDxc+bEabqC4CYF2PWZguJSZmCXZHbpAI2CJM3Vy2uLWfAe0E12 5RLFWoaLn6NOU14+vh4TiwUgQaBZj2CIsBfP4mZckTJ/i7TdUtPCG36LWeHfpedJzALV 8pranYD/F7wWk5VVTrzmSiupjQp5mCd+JDtwAFYmeOefyclGIk0LB8SGLg2T6qijGOSl KOzw== X-Gm-Message-State: AD7BkJLZLthdIH8IpsyPRcVvzruWtZOZd+XPtncyKsFocMsecRlvbImQH/c7OxIXkJAJQQ== X-Received: by 10.98.69.193 with SMTP id n62mr1275218pfi.46.1458311101098; Fri, 18 Mar 2016 07:25:01 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id l11sm4690813pfb.56.2016.03.18.07.24.58 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 18 Mar 2016 07:25:00 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH 4/8] Force to insert software single step breakpoint References: <1457088276-1170-1-git-send-email-yao.qi@linaro.org> <1457088276-1170-5-git-send-email-yao.qi@linaro.org> <56E2B0C2.705@redhat.com> <86egbay78l.fsf@gmail.com> <56EAA5A4.5040601@redhat.com> Date: Fri, 18 Mar 2016 14:25:00 -0000 In-Reply-To: <56EAA5A4.5040601@redhat.com> (Pedro Alves's message of "Thu, 17 Mar 2016 12:40:04 +0000") Message-ID: <86shznx3rd.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: 2016-03/txt/msg00331.txt.bz2 Pedro Alves writes: > Maybe what we need to do is firmly declare (and add comments in that > direction) that the arch's get_next_pcs implementation must always evalua= te=20 > the condition of conditional branches, and not put a breakpoint at the > branch destination if the condition is false, thus ensuring forward progr= ess. > The ARM implementation does this, though I haven't checked whether all the > branch instructions are covered. Some other archs don't, and always put > a break at the branch destination, like e.g., moxie_software_single_step. Some targets doesn't evaluate condition and simply insert breakpoint on possible destinations. They are cris, moxie, sparc and spu. I'll add condition evaluation to these software single step implementations. > > If we find some instruction where that is still not be sufficient, > due to side effects, then maybe gdb and gdbserver could first > try emulating the instruction's side effects manually. And only > if that doesn't work, then try displaced stepping. We could leave > that for later, until we find a need. What does "that" mean in "We could leave that for later"? Is it "instruction emulation + displaced stepping" or "displaced stepping"? It is difficult to do instruction emulation for these targets, because I need to understand the details all these targets. Just make sure I correctly understand the scope of the work. --=20 Yao (=E9=BD=90=E5=B0=A7)