From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99320 invoked by alias); 17 Sep 2018 13:34:31 -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 99301 invoked by uid 89); 17 Sep 2018 13:34:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=totally X-HELO: mail-wr1-f68.google.com Received: from mail-wr1-f68.google.com (HELO mail-wr1-f68.google.com) (209.85.221.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Sep 2018 13:34:29 +0000 Received: by mail-wr1-f68.google.com with SMTP id u12-v6so17307612wrr.4 for ; Mon, 17 Sep 2018 06:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KHe7jTLdQDtvhZz93bdds6cmfBZzNyFux8QZri5iz1Q=; b=EK/rIwl9HkjQv1GpqAsazGNFP2cvrOyeCkS3v7R5WEW/hpSo8h7S+kGRrTcfeDO5lE Tx9Pf8t+oYS+s2Ky0CEJ1NtSz+CwdS+J1eDOcNbHC0q+5LBCTHNCgzF81/o/GJ1Y1HCW MoNIuFJWe5v5O8XaigcCWbSBOIGfofxjVOC55KNSS7a1t0BBxennODdtQy4rMhXOx64L EicsBYBt4YHUrmvI0rrKt6cWHnNkKgydlCOlG4sb/0Pb1kut8A49N0Cda94VYh6uVYS1 jQSKlgbg2EEt58khw3WLnnCc8+TKGYQObYCv/Rd7KsHhRRoRiAoz7FddwlR52jFg2EDq WO4g== Return-Path: Received: from localhost (host81-158-205-250.range81-158.btcentralplus.com. [81.158.205.250]) by smtp.gmail.com with ESMTPSA id d22-v6sm28162428wra.80.2018.09.17.06.34.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Sep 2018 06:34:26 -0700 (PDT) Date: Mon, 17 Sep 2018 13:34:00 -0000 From: Andrew Burgess To: Pedro Alves Cc: Craig Blackmore , gdb-patches@sourceware.org Subject: Re: [PATCH] RISC-V: enable have_nonsteppable_watchpoint by default Message-ID: <20180917133425.GL5952@embecosm.com> References: <539c4dcf-8bfa-b567-5112-42eac55645c8@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <539c4dcf-8bfa-b567-5112-42eac55645c8@redhat.com> X-Fortune: Clones are people two. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00572.txt.bz2 * Pedro Alves [2018-09-17 13:54:38 +0100]: > On 09/16/2018 01:13 AM, Craig Blackmore wrote: > > The RISC-V debug spec 0.13 recommends that write triggers fire before > > the write is committed. If the target follows this behaviour, then > > have_nonsteppable_watchpoint needs to be set to 1 so that GDB will step > > over the watchpoint before checking if the value has changed. > > > > This patch adds a setshow for have_nonsteppable_watchpoint which defaults > > to 1 to match the recommended behaviour. If a target does not follow > > this timing, then 'set riscv have_nonsteppable_watchpoint 0' will need > > to be issued on the command line. > > > > gdb/ChangeLog: > > > > * riscv-tdep.c (set_have_nonsteppable_watchpoint): add > > callback for 'set riscv have_nonsteppable_watchpoint' > > (riscv_gdbarch_init): initialise gdbarch setting for > > have_nonesteppable_watchpoint > > This is something the target/stub knows, right? I'd be much > better to make this automatic, so that users wouldn't have to > know to tweak anything. Sure, you're thinking something like (to pick one at random) how the 'org.gnu.gdb.arm.neon' feature on ARM in the target description tells GDB how to operate, right? I totally agree. ... but.... we'd still probably want to keep the flag around (though as an auto/on/off maybe) so the user could, if they wanted, override a badly behaving target... ....and.... there's no current remote description support for RiscV at all, so having implement that as a prerequisite seems a little steep (to me). My preference would be to allow this in basically as is, then make it automatic once we have target description support in place. Alternatively we could remove the control switch for now, and just go with: set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1); for everyone. But if there's anyone out there not following the recommendation that makes things a little harder for them in the short term. What do you think? Thanks, Andrew > > Thanks, > Pedro Alves