From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25996 invoked by alias); 23 Jun 2011 14:07:35 -0000 Received: (qmail 25986 invoked by uid 22791); 23 Jun 2011 14:07:34 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Jun 2011 14:07:17 +0000 Received: (qmail 6375 invoked from network); 23 Jun 2011 14:07:16 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Jun 2011 14:07:16 -0000 From: Pedro Alves To: gdb-patches@sourceware.org, pmuldoon@redhat.com Subject: Re: [patch] [python] Expose some breakpoint operations to Python Date: Thu, 23 Jun 2011 14:07:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106231507.14817.pedro@codesourcery.com> 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: 2011-06/txt/msg00353.txt.bz2 On Thursday 23 June 2011 13:35:02, Phil Muldoon wrote: > This patch exposes to the Python API some breakpoint operations. The > operations exported are: > > print_it > print_one > print_one_detail > print_mention > > One of the changes made in this patch is to bind the Python breakpoint > and the GDB breakpoint much earlier if the breakpoint is created from > the Python API. This change was needed as some breakpoint operations > are called before the observers are notified. Previously we bound the > Python object and the breakpoint when the observer was notified. In the > case where a breakpoint is not created from the Python API this is still > the case. In any case, the ordering of breakpoint operations and > breakpoint observers means we have to bind some breakpoints at > creation. This has meant we have had to alter some of the breakpoint > APIs to carry the breakpoint object in the parameter list at creation. > > I've included both MI and CLI tests. These are very similar. The MI > tests are needed to prove that the exported Python APIs work > seamlessly with MI notifications. > > Tested on X8664 Fedora 15 with no regressions. > > What do you think? Well, here's my kneee jerk reaction. Last night I started converting all breakpoints to use breakpoint_ops, and I immediately stumbled on the fact that the print_one method doesn't appear to work as is. I don't like the idea of exposing the API as is and getting stuck with it when we haven't even made sure it's a good fit for gdb's own regular breakpoints. :-( -- Pedro Alves