From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7006 invoked by alias); 27 May 2011 20:30:44 -0000 Received: (qmail 6993 invoked by uid 22791); 27 May 2011 20:30:43 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,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; Fri, 27 May 2011 20:30:29 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4RKUSuB010472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 27 May 2011 16:30:28 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4RKURq0032519; Fri, 27 May 2011 16:30:27 -0400 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 p4RKUQqa023814; Fri, 27 May 2011 16:30:27 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 623DE3781BA; Fri, 27 May 2011 14:30:26 -0600 (MDT) From: Tom Tromey To: Kevin Pouget Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Python Finish Breakpoints References: Date: Fri, 27 May 2011 20:30:00 -0000 In-Reply-To: (Kevin Pouget's message of "Tue, 24 May 2011 08:50:33 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-05/txt/msg00657.txt.bz2 >>>>> "Kevin" == Kevin Pouget writes: Kevin> you're right; I chose the second way, Kevin> breakpoint.h: Kevin> enum py_bp_type Kevin> { Kevin> py_bp_none, /* No Python object. */ I don't think this one is needed. Kevin> py_bp_standard, /* Ordinary breakpoint object. */ Kevin> py_bp_finish /* FinishBreakpoint object. */ These should be uppercase, but it seems to me that if there are just 2 states you might as well use an ordinary boolean(-ish) flag. Kevin> as per your two comments, I now only store the `struct type' of the Kevin> function and the return value, You need to store a gdb.Type wrapper. A 'struct type' can also be invalidated when an objfile is destroyed. Kevin> diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint-cc.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint-cc.exp Tom> Funny file name. Kevin> funny but correct, or too funny? ;) It is more usual in the gdb test suite to give the .cc and .exp files the same base name. Kevin> I'll work on the tests for the next version of the patch ("return" Kevin> should already be covered) I will wait for this to do more review. Kevin> @defivar FinishBreakpoint out_of_scope_notif Kevin> This attribute will be @code{True} until the @code{out_of_scope} method has Kevin> been called and @code{False} afterwards. This attribute is writeable, so out Kevin> of scope notifications can be re-enabled. Kevin> @end defivar I still don't really understand under what circumstances it is useful for a program to set this attribute. Kevin> - avoid calling `out_of_scope' every normal_stop when the breakpoint Kevin> is not anymore in the callstack I think it would be ok to just leave this up to the subclass to handle. Kevin> - allow the script to re-activate notification when it wants to Kevin> 're-use' the FinishBreakpoint (instead of deleting it / creating a new Kevin> one) I am not sure when this makes sense. Tom