This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, doc RFA] New attribute "progspace" for python gdb.Objfile objects
- From: Doug Evans <dje at google dot com>
- To: Eli Zaretskii <eliz at gnu dot org>, gdb-patches at sourceware dot org
- Date: Fri, 17 Oct 2014 11:03:18 -0700
- Subject: Re: [PATCH, doc RFA] New attribute "progspace" for python gdb.Objfile objects
- Authentication-results: sourceware.org; auth=none
- References: <yjt24mv77h9y dot fsf at ruffy dot mtv dot corp dot google dot com> <83a94z6uzu dot fsf at gnu dot org> <21565 dot 19630 dot 653536 dot 736463 at ruffy2 dot mtv dot corp dot google dot com>
Doug Evans writes:
> Eli Zaretskii writes:
> > > From: Doug Evans <dje@google.com>
> > > Date: Mon, 13 Oct 2014 15:10:17 -0700
> > >
> > > This patch adds a new attribute "progspace" for python gdb.Objfile objects.
> > >
> > > While one could just always use gdb.current_progspace(), having to refer
> > > to global state is generally a no-no in an API. The progspace is
> > > recorded with the objfile, this patch exposes it.
> > >
> > > Regression tested on amd64-linux.
> > >
> > > 2014-10-13 Doug Evans <dje@google.com>
> > >
> > > * NEWS: Mention new gdb.Objfile.progspace attribute.
> > > * python/py-objfile.c (objfpy_get_progspace): New function.
> > > (objfile_getset): New entry for "progspace".
> > >
> > > doc/
> > > * python.texi (Objfiles In Python): Document new progspace attribute.
> > >
> > > testsuite/
> > > * gdb.python/py-objfile.exp: Test progspace attribute.
> >
> > OK for the documentation parts.
> >
> > Thanks.
>
> Thanks.
>
> Here's an updated version, I forgot to increment the reference count
> of the pspace object. Doh!
>
> [No doc changes.]
>
> 2014-10-13 Doug Evans <dje@google.com>
>
> * NEWS: Mention new gdb.Objfile.progspace attribute.
> * python/py-objfile.c (objfpy_get_progspace): New function.
> (objfile_getset): New entry for "progspace".
>
> doc/
> * python.texi (Objfiles In Python): Document new progspace attribute.
>
> testsuite/
> * gdb.python/py-objfile.exp: Test progspace attribute.
I have committed this.