From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9181 invoked by alias); 10 Mar 2011 21:43:56 -0000 Received: (qmail 9173 invoked by uid 22791); 10 Mar 2011 21:43:55 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Mar 2011 21:43:45 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2ALhgd9005197 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Mar 2011 16:43:42 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2ALhgbV009350; Thu, 10 Mar 2011 16:43:42 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p2ALhfBH021268; Thu, 10 Mar 2011 16:43:41 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 45FF53797CD; Thu, 10 Mar 2011 14:43:41 -0700 (MST) From: Tom Tromey To: Doug Evans Cc: pmuldoon@redhat.com, gdb-patches@sourceware.org Subject: Re: [patch] [python] Implement stop_p for gdb.Breakpoint References: Date: Fri, 11 Mar 2011 01:55:00 -0000 In-Reply-To: (Doug Evans's message of "Wed, 9 Mar 2011 20:41:05 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: 2011-03/txt/msg00644.txt.bz2 Tom> My reason is that the Python method is an implementation detail of some Tom> kind of "stop point" provided by a Python script. =C2=A0It is not read= ily Tom> mutable by the user. =C2=A0On the other hand, the condition is somethi= ng Tom> explicitly under the user's control. Doug> That sounds a bit weird. Doug> The python method is part of an API. Doug> APIs are not implementation details. I think we are using the same words to mean different things. I was using this from the point of view of writing a gdb extension using the new feature. E.g., consider the log-printf code. The new method is used by log-printf to do its work. Here, the method is an implementation detail of log-printf. I'm sorry for being unclear. Tom> I think the most conservative approach is to make it an error for the Tom> user to set a condition on a breakpoint that has a stop_p method, and Tom> vice versa. =C2=A0That preserves the ability to make a different decis= ion Tom> later. Doug> That's what I'd do. I don't see the contradiction. Doug> [Remember I'm talking about an *intuitive* sense here, not any literal Doug> sense ("literal" as in something I might intend we document). Doug> If my intuitive sense doesn't work for you, you don't have to use it. Doug> :-) We seem to both agree on the end result.] I don't really agree, but I think it is less important than getting some variant of the patch in. Phil is already implementing this and I think should have a new patch shortly. Tom