From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17915 invoked by alias); 14 Dec 2010 17:18:32 -0000 Received: (qmail 17898 invoked by uid 22791); 14 Dec 2010 17:18:31 -0000 X-SWARE-Spam-Status: No, hits=-5.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; Tue, 14 Dec 2010 17:18:25 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBEHILnP015139 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Dec 2010 12:18:21 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oBEHIKxs002071; Tue, 14 Dec 2010 12:18:20 -0500 From: Phil Muldoon To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [patch] Add an evaluation function hook to Python breakpoints. References: Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Tue, 14 Dec 2010 17:18:00 -0000 In-Reply-To: (Doug Evans's message of "Mon, 13 Dec 2010 19:31:44 -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 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-12/txt/msg00244.txt.bz2 Doug Evans writes: >> It's nothing more than a hook for the user to accomplish some truth >> finding mission at breakpoint evaluation time. =C2=A0If the user wants to >> collect data, then I think they can do that -- that is we should not >> attempt to stop them. =C2=A0I probably worded my email hastily; FWIW I t= hink >> this a place where we can write conditional breakpoints that can be >> written entirely in Python. > > I'm not suggesting we stop users from doing quick hacks. :-) > [Heck, can they already write a breakpoint condition in Python? E.g. > with a python convenience function?] We could call the function "collect" (or whatever we want) and allow the user to collect data and document it/bless it as a way to do it. And if on that data they wanted to issue a stop, they could return True. We could remove any mention of it being a replacement for conditional breakpoints. If that satisfies your requirements, then it is simply a name change/messaging/documentation tweak.=20=20 If this is just to be a pure data collecting hook, I suspect we would have to move the code up from bpstat_check_breakpoint_conditions to the calling function bpstop_stop_status. Then we would not be able to give the user the functionality to stop. But it would be the same code in a different place I like the first option, and there is no performance loss for providing the option to stop. What do you think? Cheers, Phil