From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7360 invoked by alias); 7 Jul 2006 13:18:00 -0000 Received: (qmail 7349 invoked by uid 22791); 7 Jul 2006 13:17:59 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 07 Jul 2006 13:17:57 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FyqDS-0005Vu-4D; Fri, 07 Jul 2006 09:17:54 -0400 Date: Fri, 07 Jul 2006 13:18:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Wu Zhou , gdb-patches@sourceware.org Subject: Re: [ppc-linux-nat]: set access flag for h/w watchpoint even if it is only read or write Message-ID: <20060707131754.GB20201@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , Wu Zhou , gdb-patches@sourceware.org References: <20060707003521.worrm140yso4g8s8@imap.linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00055.txt.bz2 On Fri, Jul 07, 2006 at 01:04:36PM +0300, Eli Zaretskii wrote: > I think the reason it works for me is that on x86, there's no real > support for read watchpoints, so we actually set a read-write > watchpoint, and then the logic of watchpoint_check does TRT. Precisely. > The question is, how to do that without breaking other platforms, like > x86, which we cannot trust. If you can come up with a design that > accommodates both types of situations, I will be happy to review it. > > Daniel, could you please point me to Ulrich's change, either in > ChangeLogs or in the sources? I cannot find it forf some reason. I must be mistaken; our S/390 support doesn't have any read watchpoints (I don't know if the architecture does or not). In fact I can't find any architecture that does this. But I immediately recognized the description of the problem... so it must have happened somewhere. I can't find the discussion of it, but the gdbserver crisv32 port does the same thing: /* Read watchpoints are set as access watchpoints, because of GDB's inability to deal with pure read watchpoints. */ if (type == '3') type = '4'; Here's some more about it: http://sources.redhat.com/ml/gdb/2005-11/msg00231.html In which I also claimed S/390 did it, which doesn't appear to be true, but at least I've had the same misconception for a while now. -- Daniel Jacobowitz CodeSourcery