This is the mail archive of the
mailing list for the GDB project.
Re: Why do functions objfpy_new and pspy_new exist?
- From: <Paul_Koning at Dell dot com>
- To: <pmuldoon at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>, <dje at google dot com>
- Date: Thu, 25 Sep 2014 15:18:44 +0000
- Subject: Re: Why do functions objfpy_new and pspy_new exist?
- Authentication-results: sourceware.org; auth=none
- References: <yjt2fvfgr95t dot fsf at ruffy dot mtv dot corp dot google dot com> <5423E9C7 dot 3060202 at redhat dot com>
On Sep 25, 2014, at 6:09 AM, Phil Muldoon <email@example.com> wrote:
> On 24/09/14 22:38, Doug Evans wrote:
>> 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()
>> 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.