From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22511 invoked by alias); 20 Oct 2011 20:00:19 -0000 Received: (qmail 22497 invoked by uid 22791); 20 Oct 2011 20:00:18 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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, 20 Oct 2011 19:59:58 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9KJxv0O025088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 Oct 2011 15:59:57 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9KJxuhC022790; Thu, 20 Oct 2011 15:59:56 -0400 Received: from barimba (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 p9KJxtWK010253; Thu, 20 Oct 2011 15:59:55 -0400 From: Tom Tromey To: Kevin Pouget Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Python Finish Breakpoints References: Date: Thu, 20 Oct 2011 20:12:00 -0000 In-Reply-To: (Kevin Pouget's message of "Thu, 13 Oct 2011 16:33:31 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-10/txt/msg00575.txt.bz2 >>>>> "Kevin" == Kevin Pouget writes: Kevin> I would like to come back on this patch discussion, I know it has been Kevin> a while since the last post (May 30th), but I was waiting for my Kevin> copyright assignment to be ready, and then had to empty the patches Kevin> already in the pipe. Thanks for reopening this. I'd like this functionality, in some form :), to go in. Kevin> it appeared that the most stormy part was related to the Kevin> FinishBreakpoint.out_of_scope() callback: >> @defop Operation {gdb.Breakpoint} out_of_scope (self) >> In some circonstances (eg, @code{longjmp}, C++ exceptions, @value{GDBN} >> @code{return} command, ...), a function may not properly terminate, and thus >> never hit a @{code} FinishBreakpoint. When @value{GDBN} notices such a >> situation, the @code{out_of_scope} function will be triggered. Kevin> I'll try a last time to convince you about its necessity, then I'll Kevin> consider dropping it off ! Kevin> The main rational behind this callback is housekeeping: I'm building Kevin> new functionalities on top of the Python interface, and I would like Kevin> it to be invisible to the user (eg, when GDB performs a 'next/finish', Kevin> you don't want to let the internal breakpoints in the inferior when Kevin> the commands returns, in any situation. Kevin> In the case of FinishBreakpoints, I would like to easily know if when Kevin> the BP became meaningless (that is, the exec ran out of the scope Kevin> where the FBP can be trigged) and time has come to remove it. Kevin> Does it make sense? I think a callback like this does make sense for finish breakpoints. >From looking back at the old thread, the problem I had was that I did not understand the way that the callback was used, or the purpose of the "out_of_scope_notif" attribute. I'll send some notes on the latest version of the patch in a bit. Tom