From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15863 invoked by alias); 16 Apr 2004 11:42:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15851 invoked from network); 16 Apr 2004 11:42:54 -0000 Received: from unknown (HELO miranda.se.axis.com) (193.13.178.2) by sources.redhat.com with SMTP; 16 Apr 2004 11:42:54 -0000 Received: from axis.com (ironmaiden.se.axis.com [10.13.8.120]) by miranda.se.axis.com (8.12.9/8.12.9/Debian-5local0.1) with ESMTP id i3GBgIUm027031; Fri, 16 Apr 2004 13:42:18 +0200 Message-ID: <407FC69A.1000701@axis.com> Date: Fri, 16 Apr 2004 11:42:00 -0000 From: Orjan Friberg Organization: Axis Communications User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 MIME-Version: 1.0 To: Eli Zaretskii CC: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: Display of read/access watchpoints when HAVE_NONSTEPPABLE_WATCHPOINT References: <407282F4.2080602@axis.com> <20040406142228.GA29473@nevyn.them.org> <6654-Thu15Apr2004111217+0300-eliz@gnu.org> <407E8CEF.2050007@axis.com> In-Reply-To: <407E8CEF.2050007@axis.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00347.txt.bz2 Orjan Friberg wrote: > > 1. Add a check if the target cannot set "pure" read watchpoints to the > b->type == bp_read_watchpoint check at WP_VALUE_CHANGED (my > interpretation of Eli's suggestion). On second thought, this actually is no good for a target which *can* set pure read watchpoints. If there's both a watch and an rwatch on a variable that is written, we'll get a false read watchpoint hit. For the sake of argument, say that the implementation is called TARGET_CANNOT_SET_PURE_READ_WATCHPOINTS (the i386 would return 1, my target would return 0). The check for a read watchpoint would then be case WP_VALUE_CHANGED: if (b->type == bp_read_watchpoint && TARGET_CANNOT_SET_PURE_READ_WATCHPOINTS) /* Don't stop. */ For i386, nothing would change. For my target, the following would happen (foo is watched and rwatched, original value != 0): a = foo; /* foo read; read watchpoint hits. */ foo = 1; /* foo written; write watchpoint hits, read watchpoint hits incorrectly. */ -- Orjan Friberg Axis Communications