From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10099 invoked by alias); 6 May 2004 21:49:35 -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 10089 invoked from network); 6 May 2004 21:49:34 -0000 Received: from unknown (HELO sadr.equallogic.com) (66.155.203.134) by sources.redhat.com with SMTP; 6 May 2004 21:49:34 -0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id i46LnXZh009063 for ; Thu, 6 May 2004 17:49:34 -0400 Received: from M30.equallogic.com (m30 [172.16.1.30]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id i46LnWnC009058; Thu, 6 May 2004 17:49:32 -0400 Received: from pkoning.equallogic.com ([172.16.1.166]) by M30.equallogic.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 6 May 2004 17:49:32 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16538.45802.139190.434825@gargle.gargle.HOWL> Date: Thu, 06 May 2004 21:49:00 -0000 From: Paul Koning To: weigand@i1.informatik.uni-erlangen.de Cc: orjan.friberg@axis.com, kettenis@chello.nl, gdb-patches@sources.redhat.com, eliz@gnu.org, drow@false.org Subject: Re: Display of read/access watchpoints when HAVE_NONSTEPPABLE_WATCHPOINT References: <16536.61374.770000.659411@gargle.gargle.HOWL> <200405062138.XAA05769@faui1d.informatik.uni-erlangen.de> X-OriginalArrivalTime: 06 May 2004 21:49:32.0274 (UTC) FILETIME=[03B80D20:01C433B4] X-SW-Source: 2004-05/txt/msg00162.txt.bz2 >>>>> "Ulrich" == Ulrich Weigand writes: >> My experience was that the old code worked if you had only a >> watchpoint active, but it would produce the wrong results if you >> had both watchpoints and breakpoints active. The reason was that >> the scan for matching break/watch points would conclude that the >> target break had happened due to a non-matching watchpoint and >> would proceed, rather than break. Ulrich> But this error scenario should only apply to read/access Ulrich> watchpoints, never write watchpoints. A write watchpoint Ulrich> should never be misdetected ... Sorry, I wasn't clear in the explanation, faulty memory. The actual explanation: a "hard breakpoint" ("break" instruction assembled-in, rather than inserted by gdb) is detected by the fact that nothing matches in the scan of the break/watch point list. The original code would work correctly if only breakpoints were set. If watchpoints were also set, a hard breakpoint would be treated as a mismatched watchpoint, and gdb would just continue rather than stopping. >> That doesn't seem like a good idea. Why would it be reasonable to >> treat the two differently? Ulrich> Because a write watchpoints can be handled without hardware Ulrich> support to provide the address, while read/access watchpoints Ulrich> fundamentally cannot be. Except for the issue that Daniel just mentioned (foo = 1; foo = 1;) paul