From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3635 invoked by alias); 23 Jun 2011 14:46:43 -0000 Received: (qmail 3627 invoked by uid 22791); 23 Jun 2011 14:46:42 -0000 X-SWARE-Spam-Status: No, hits=-6.2 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, 23 Jun 2011 14:46:23 +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.14.4/8.14.4) with ESMTP id p5NEkGE5023375 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 Jun 2011 10:46:16 -0400 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 p5NEkEbp010774; Thu, 23 Jun 2011 10:46:15 -0400 From: Phil Muldoon To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [patch] [python] Expose some breakpoint operations to Python References: <201106231507.14817.pedro@codesourcery.com> Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Thu, 23 Jun 2011 14:46:00 -0000 In-Reply-To: <201106231507.14817.pedro@codesourcery.com> (Pedro Alves's message of "Thu, 23 Jun 2011 15:07:14 +0100") 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 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/msg00355.txt.bz2 Pedro Alves writes: >> 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. :-( I'm curious to know what is wrong with it. print_one just passes the breakpoint and the address to the consumer, and the consumer then just prints to the "Addr" and "What" fields. In the strict context of the API, it works in the Python tests. Can you expand on that instance? OTOH, in a larger sense, I agree with your internal API statement. If it is not suitable yet, we should not expose it yet. For example the "print_it" enum 'SRC_ONLY' just prints a source-line number (without a file). I cannot fathom how it would be useful. Then again, there is lots that I do not consider useful, but it is in some other GDB context. If you have a plan for the API, could your write it up? I am ready and willing to help out wherever and whenever needed. Cheers Phil -- Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson (USA), Charlie Peters (USA)