From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13921 invoked by alias); 23 Apr 2012 14:11:51 -0000 Received: (qmail 13760 invoked by uid 22791); 23 Apr 2012 14:11:47 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,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; Mon, 23 Apr 2012 14:11:31 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3NEBRlZ007110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Apr 2012 10:11:27 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3NEBPTf017798; Mon, 23 Apr 2012 10:11:26 -0400 Message-ID: <4F95630D.1000202@redhat.com> Date: Mon, 23 Apr 2012 14:45:00 -0000 From: Phil Muldoon MIME-Version: 1.0 To: Eli Zaretskii CC: tromey@redhat.com, sivachandra@google.com, dje@google.com, ratmice@gmail.com, gdb-patches@sourceware.org Subject: Re: [RFC - Python scripting] New methods Symtab.global_block and Symtab.static_block (docs included) References: <831unms3jy.fsf@gnu.org> <4F8F187D.3050402@redhat.com> <878vhsojgd.fsf@fleche.redhat.com> <87sjfyi5rj.fsf@fleche.redhat.com> <87lilmh9jf.fsf@fleche.redhat.com> <4F95595A.8080106@redhat.com> <83y5pmft8k.fsf@gnu.org> In-Reply-To: <83y5pmft8k.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2012-04/txt/msg00745.txt.bz2 On 04/23/2012 02:55 PM, Eli Zaretskii wrote: >> Date: Mon, 23 Apr 2012 14:30:02 +0100 >> From: Phil Muldoon >> CC: Siva Chandra , Doug Evans , >> Matt Rice , Eli Zaretskii , >> gdb-patches@sourceware.org >> >> On 04/23/2012 02:17 PM, Tom Tromey wrote: >>>>>>>> "Siva" == Siva Chandra writes: >>> >>> Siva> Overall, wrt this patch, what should we conclude? >>> >>> I think the patch is fine, and we're just discussing what exactly the >>> manual should say. >> >> My view is that we should not say anything, that it will just be >> confusing to the user. There is no user facing concept of a "static" >> or "global" block in GDB other than the Python API anyway. > > We cannot have 2 separate APIs, one called Symtab.global_block, the > other Symtab.static_block, without saying at least _something_ about > what these names are about. > > Also, the Python API to GDB _is_ user-level. > > Apologies if I am missing the context of what you said. I agree, and we have documentation and an API for is_static block and is_global block APIs already. Describing what they are now, contextually, is fine -- no problem with that. I am just not sure we should have compatibility warnings that the content/structure of these blocks may change in some undefined way, at some future time. I think we should document it when, and if that happens, and what, if any, ramifications may occur. Arguable the above warning could apply to most of the Python API. We tend to just deal with it in the API when it happens. While I understand the well-meaning thought behind this, I am not sure it is prudent to start this trend now. We have an API promise to specifically deal with these issues. If we start warning that in the future this feature might change, are we just creating loop-holes for the API promise? In fact my benchmark for exporting something to the Python API is testing the likely-hood if it will change in the near future. But, to date, I find that most of GDB remains fairly constant. And finally, yeah that is what I mean: Python is the only user-facing API for these attributes. There is no conflict between something in the CLI and something in Python. Cheers, Phil