This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, doc RFA] Add ability to set random attributes in python objfiles,progspaces
- From: Doug Evans <dje at google dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>, Eli Zaretskii <eliz at gnu dot org>
- Date: Thu, 9 Oct 2014 12:09:59 -0700
- Subject: Re: [PATCH, doc RFA] Add ability to set random attributes in python objfiles,progspaces
- Authentication-results: sourceware.org; auth=none
- References: <yjt27g09qcx2 dot fsf at ruffy dot mtv dot corp dot google dot com>
On Thu, Oct 9, 2014 at 12:08 PM, Doug Evans <dje@google.com> wrote:
> Hi.
>
> I have a need to do some extra record keeping in progspaces and
> objfiles. This patch adds the ability to add random attributes
> to objfile and progspace objects using the same mechanism used
> for gdb.Fields.
>
> Regression tested on amd64-linux.
>
> 2014-10-09 Doug Evans <dje@google.com>
>
> * NEWS: Mention ability add attributes to gdb.Objfile and
> gdb.Progspace objects.
> * python/py-objfile.c (objfile_object): New member dict.
> (objfpy_dealloc): Py_XDECREF dict.
> (objfpy_initialize): Initialize dict.
> (objfile_getset): Add __dict__.
> (objfile_object_type): Set tp_dictoffset member.
> * python/py-progspace.c (progspace_object): New member dict.
> (pspy_dealloc): Py_XDECREF dict.
> (pspy_initialize): Initialize dict.
> (pspace_getset): Add __dict__.
> (pspace_object_type): Set tp_dictoffset member.
>
> doc/
> * gdb.texinfo (Progspaces In Python): Document ability to add
> random attributes to gdb.Progspace objects.
> (Objfiles In Python): Document ability to add random attributes to
> gdb.objfile objects.
>
> testsuite/
> * gdb.python/py-objfile.exp: Add tests for setting random attributes
> in objfiles.
> * gdb.python/py-progspace.exp: Add tests for setting random attributes
> in progspaces.
Oh, btw, if you're going to try this patch,
it depends on
https://sourceware.org/ml/gdb-patches/2014-10/msg00206.html