From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24081 invoked by alias); 5 Jun 2008 18:34:10 -0000 Received: (qmail 24049 invoked by uid 22791); 5 Jun 2008 18:34:09 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 05 Jun 2008 18:33:49 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 18620983F8; Thu, 5 Jun 2008 18:33:48 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 0180F98371; Thu, 5 Jun 2008 18:33:48 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1K4KHT-0005J3-Ar; Thu, 05 Jun 2008 14:33:47 -0400 Date: Thu, 05 Jun 2008 18:34:00 -0000 From: Daniel Jacobowitz To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: remove global stop_bpstat dependency from breakpoints module Message-ID: <20080605183347.GD16610@caradoc.them.org> Mail-Followup-To: Pedro Alves , gdb-patches@sourceware.org References: <200805080222.04976.pedro@codesourcery.com> <20080605180331.GB16610@caradoc.them.org> <200806051927.07953.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200806051927.07953.pedro@codesourcery.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2008-06/txt/msg00048.txt.bz2 On Thu, Jun 05, 2008 at 07:27:07PM +0100, Pedro Alves wrote: > As I said, I would mind at all to change this to the read > the PC of the current thread. Just pointing out the current > behaviour. I think that would be correcting it to the right behavior. In 99% of the cases where this is used at all, they mean the same thing. > > > One way to fix it, would be to also loop through all threads to update > > > their version of stop_bpstat, but I'd like better. > > > > If we do need to context-switch stop_bpstat, it seems like checking > > all of those would be simpler than this patch as posted. > > Well, simpler yes, but adds even more coupling. I thought this was > a nice cleanup. It's mentioned a few times in comments > throughout breakpoints.c. I don't like reference counting as a solution to clear memory management. Sometimes it's necessary or helpful, but here I think it just gives us room to be careless (and have to worry more about leaks). -- Daniel Jacobowitz CodeSourcery