From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15412 invoked by alias); 17 Sep 2018 12:54:42 -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 15397 invoked by uid 89); 17 Sep 2018 12:54:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Mon, 17 Sep 2018 12:54:40 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 98E60307C700; Mon, 17 Sep 2018 12:54:39 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01A91106A790; Mon, 17 Sep 2018 12:54:38 +0000 (UTC) Subject: Re: [PATCH] RISC-V: enable have_nonsteppable_watchpoint by default To: Craig Blackmore , gdb-patches@sourceware.org References: From: Pedro Alves Message-ID: <539c4dcf-8bfa-b567-5112-42eac55645c8@redhat.com> Date: Mon, 17 Sep 2018 12:54:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-09/txt/msg00570.txt.bz2 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. Thanks, Pedro Alves