From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32748 invoked by alias); 15 Aug 2010 12:08:32 -0000 Received: (qmail 32740 invoked by uid 22791); 15 Aug 2010 12:08:32 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,BOTNET,RDNS_NONE X-Spam-Check-By: sourceware.org Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Aug 2010 12:04:11 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7FC3wXr009797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 15 Aug 2010 08:03:58 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7FC3rVQ013077 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 Aug 2010 08:03:55 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o7FC3rf0001435; Sun, 15 Aug 2010 14:03:53 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o7FC3qZJ001434; Sun, 15 Aug 2010 14:03:52 +0200 Date: Sun, 15 Aug 2010 12:08:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org, Chris Moller Subject: Re: [patch] Fix crash on conditional watchpoints (PR 11371) Message-ID: <20100815120352.GA31465@host1.dyn.jankratochvil.net> References: <20100811202053.GB16057@host1.dyn.jankratochvil.net> <201008140338.17793.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201008140338.17793.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-12-10) 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-08/txt/msg00210.txt.bz2 On Sat, 14 Aug 2010 04:38:17 +0200, Pedro Alves wrote: > Please give this alternative patch a try, and let me know what you think. I find this patch as a better one. (I could not (easily) regression it myself as sourceware.org is down today.) > +/* Decrement reference count. If the reference count reaches 0, > + destroy the bp_location. Sets *BLP to NULL. */ > + > +static void > +decref_bp_location (struct bp_location **blp) > +{ I miss here some: gdb_assert ((*blp)->refc > 0); > + if (--(*blp)->refc == 0) > + free_bp_location (*blp); > + *blp = NULL; > +} Thanks, Jan