From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25590 invoked by alias); 4 Mar 2010 16:05:01 -0000 Received: (qmail 25495 invoked by uid 22791); 4 Mar 2010 16:05:00 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Mar 2010 16:04:57 +0000 Received: (qmail 26151 invoked from network); 4 Mar 2010 16:04:55 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Mar 2010 16:04:55 -0000 From: Pedro Alves To: Eli Zaretskii Subject: Re: Somewhat sanitize watchpoints with conditions on local expressions Date: Thu, 04 Mar 2010 16:05:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-19-generic; KDE/4.3.2; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <201003040350.34417.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003041604.53513.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2010-03/txt/msg00184.txt.bz2 On Thursday 04 March 2010 07:55:26, Eli Zaretskii wrote: > > +static int > > +is_watchpoint (struct breakpoint *bpt) > > +{ > > + return (is_hardware_watchpoint (bpt) > > + || bpt->type == bp_watchpoint); > > +} > > Does this catch read and access watchpoints? Should it? It does, and it should. I've added the below to the patch. -- Pedro Alves Index: src/gdb/breakpoint.c =================================================================== --- src.orig/gdb/breakpoint.c 2010-03-04 16:03:30.000000000 +0000 +++ src/gdb/breakpoint.c 2010-03-04 16:03:09.000000000 +0000 @@ -921,6 +921,8 @@ insert_catchpoint (struct ui_out *uo, vo b->ops->insert (b); } +/* Return true if BPT is of any hardware watchpoint kind. */ + static int is_hardware_watchpoint (struct breakpoint *bpt) { @@ -929,6 +931,9 @@ is_hardware_watchpoint (struct breakpoin || bpt->type == bp_access_watchpoint); } +/* Return true if BPT is of any watchpoint kind, hardware or + software. */ + static int is_watchpoint (struct breakpoint *bpt) {