From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1462 invoked by alias); 25 Jul 2011 12:39:25 -0000 Received: (qmail 1454 invoked by uid 22791); 25 Jul 2011 12:39:25 -0000 X-SWARE-Spam-Status: No, hits=-6.9 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; Mon, 25 Jul 2011 12:38:57 +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 p6PCcmoP012333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Jul 2011 08:38:48 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6PCclsp017696; Mon, 25 Jul 2011 08:38:47 -0400 From: Phil Muldoon To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [0/6] breakpoints_ops for all kinds of breakpoints References: <201107221640.25105.pedro@codesourcery.com> <201107251236.46235.pedro@codesourcery.com> Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Mon, 25 Jul 2011 14:40:00 -0000 In-Reply-To: <201107251236.46235.pedro@codesourcery.com> (Pedro Alves's message of "Mon, 25 Jul 2011 12:36:46 +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-07/txt/msg00687.txt.bz2 Pedro Alves writes: > On Friday 22 July 2011 18:32:59, Phil Muldoon wrote: >> I think it is great. It clears up several (dozen) ambiguities with >> breakpoint operations. I don't think this will affect the Python >> breakpoint_ops work (other than some refactoring, but we'll come to that >> bridge when your work is checked in). > > Yeah, I don't think your current patch would need more than a > some trivial updates, but then again, I did leave the print_one > method behind in this conversion, which was the method that > I raised having the issue that doesn't seem to fit for gdb's own > breakpoints currently, so we should clean that up before > considering exposing it as public API. I have been thinking on your comments quite a bit in the last few weeks, and about external facing APIs in general. I don't think it is sensible to make 1:1 mappings of these breakpoint_ops APIs to Python. I think "print_one" "print_it" mean nothing to a Python scripting user. I've come to the conclusion that we should abstract these functions to concepts a Python scripter can better understand. So "print_one" will not be directly exposed as before. The Python API, will end up calling print_one, sure, but there will (I hope) be sufficient levels of abstraction that any future refactoring will be coped with internally. We already massage the data to-and-from GDB extensively anyway, so it makes better sense to the user. So my plan is to submit a patch after yours is checked in, with the new APIs. We can look again, then, if it makes sense at that point, and if any future refactorings of print_one will really matter to the user from an API perspective. Cheers, Phil