From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21021 invoked by alias); 25 Sep 2014 21:29:15 -0000 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 Received: (qmail 21006 invoked by uid 89); 25 Sep 2014 21:29:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 25 Sep 2014 21:29:14 +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 s8PLTAVZ003342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Sep 2014 17:29:10 -0400 Received: from localhost.localdomain (ovpn-112-17.ams2.redhat.com [10.36.112.17]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8PLBYeA017579; Thu, 25 Sep 2014 17:11:34 -0400 Message-ID: <54248505.7030809@redhat.com> Date: Thu, 25 Sep 2014 21:29:00 -0000 From: Phil Muldoon MIME-Version: 1.0 To: Paul_Koning@dell.com CC: gdb-patches@sourceware.org, dje@google.com Subject: Re: Why do functions objfpy_new and pspy_new exist? References: <5423E9C7.3060202@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00749.txt.bz2 On 25/09/14 16:18, Paul_Koning@dell.com wrote: > > On Sep 25, 2014, at 6:09 AM, Phil Muldoon wrote: > >> On 24/09/14 22:38, Doug Evans wrote: >>> Hi. >>> >>> Normally, python wrappers of gdb objects are created with a >>> foo_to_foo_object function. >>> E.g., objfile_to_objfile_object and pspace_to_pspace_object. >>> >>> So why do objfpy_new and pspy_new exist? >>> [defined in py-objfile.c and py-progspace.c respectively] >>> >>> IOW, when would one ever usefully do something with >>> foo_objfile = gdb.Objfile() >>> or >>> foo_pspace = gdb.Progspace() >> >> I can't think of a reason. But someone else might. Anyway the point >> is moot (unfortunately) as we have an API promise, so they get to >> stay. Forever. > > I would usually agree, but I would make an exception if the API function in question does not produce anything that can be used for any plausible purpose. That may be the case here. I really don't disagree with you Paul. But we have to prove plausible, and perhaps wait until someone turns up and says "oh I have this plausible scenario". Perhaps a patch to gdb-patches and a suitable wait is OK, (though I am not sure GDB Python users read that list). It is, trust me, a frequent frustration for me to add yet-another-keyword-while-preserving-original-behavior, especially with the Python 2.x and 3.x as well. It is, I think, becoming impossible to manage. I don't have an objection beyond does this break the API promise. That's all I care about. I did not make that promise -- these decisions were made before my time. But I think we should uphold it. Maybe if GDB future releases requires only Python 3.x in future we can amend that. Cheers, Phil