This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] [PATCH] Provide the ability to write the frame unwinder in Python
- From: Doug Evans <dje at google dot com>
- To: Alexander Smundak <asmundak at google dot com>
- Cc: Andy Wingo <wingo at igalia dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 31 Mar 2015 15:36:26 -0700
- Subject: Re: [RFC] [PATCH] Provide the ability to write the frame unwinder in Python
- Authentication-results: sourceware.org; auth=none
- References: <CAHQ51u7NUoQ8w9c5mc-Eiz05b1Nub6zqj_Ne7vfgWb5EP9_X8w at mail dot gmail dot com> <21714 dot 40641 dot 510825 dot 30998 at ruffy2 dot mtv dot corp dot google dot com> <CAHQ51u5_ViLaEmv9e43R-wzuWw8dwNkb-2XgCRy5ELQq5FUAWg at mail dot gmail dot com> <54E71694 dot 1080304 at redhat dot com> <CAHQ51u75+9HYAVJXYNQa0gTnQtYKEgmSkyAhAPYp-y4HGtXssg at mail dot gmail dot com> <CAHQ51u6UZ7A47rpGgX0QGeYSTCz1eo_3jWHc=q2ZX3YhqcJ6iQ at mail dot gmail dot com> <87ioei31uj dot fsf at igalia dot com> <CAHQ51u4f+Vx7qXPm-KAAENOceaVogMbDMw6==N_nY+GrLr4Pgg at mail dot gmail dot com> <87d24p19tt dot fsf at igalia dot com> <54FD7DAA dot 7010603 at redhat dot com> <CAHQ51u7sUkGhkmvTaaO_Jo6Jn+kojfiMWHmc2=7OWHThAq6EKw at mail dot gmail dot com> <87twxrncld dot fsf at igalia dot com> <CAHQ51u60nHp1a2DXZ4srvRefyTtge1BUw7-=JuYqChHN_wUGyQ at mail dot gmail dot com> <87ioe1dvu2 dot fsf at igalia dot com> <CAHQ51u7KzQLSLC=QeLA=zd+TUkbbNzzndfeVLFWpjiR-pL8ang at mail dot gmail dot com> <87sid4atms dot fsf at igalia dot com> <CAHQ51u6=9BKf6YSTavbY7u_Mi6miKJ_Yo1QcaG=KsYtYzoWY_Q at mail dot gmail dot com> <CAHQ51u4ybxem1X89G7frW-N_gZK6q3rKLunxgf+7UPzpswCfNg at mail dot gmail dot com> <87r3smado6 dot fsf at igalia dot com> <CAHQ51u6+sCwSi3dYQXsz7orjq-yGjX6PayQduwVURx3DxpK=oA at mail dot gmail dot com> <21776 dot 28787 dot 615626 dot 171251 at ruffy2 dot mtv dot corp dot google dot com> <CAHQ51u49b6rcb3m7XM=0i=pfdG9A7wKeV8SXPOhpRps=s3-HSg at mail dot gmail dot com> <21781 dot 55769 dot 949230 dot 79805 at ruffy2 dot mtv dot corp dot google dot com> <CAHQ51u5=mNXcA_CY4hQuvVHSKuMbaVUYyHvhrgZEUJZdX2iL8Q at mail dot gmail dot com> <21785 dot 35758 dot 416843 dot 730797 at ruffy2 dot mtv dot corp dot google dot com> <CAHQ51u6+Yexa0Acn7z6ebya0zF9znb0jOwbA0HdwcB+-osKOzQ at mail dot gmail dot com>
Alexander Smundak writes:
> Fixed documentation and added '_gdb.' prefix to 'objfiles()'.
> PTAL.
>
>
> On Mon, Mar 30, 2015 at 10:45 AM, Doug Evans <dje@google.com> wrote:
> > Alexander Smundak writes:
> > > Addressed eliz@ and dje@ comments.
> > >
> > > gdb/ChangeLog
> > >
> > > 2015-03-28 Sasha Smundak <asmundak@google.com>
> > >
> > > * Makefile.in (SUBDIR_PYTHON_OBJS): Add py-unwind.o.
> > > (SUBDIR_PYTHON_SRCS): Add py-unwind.c.
> > > (py-unwind.o): New recipe.
> > > * NEWS: mention Python frame unwinding.
> > > * data-directory/Makefile.in (PYTHON_FILE_LIST): Add
> > > gdb/unwinder.py and gdb/command/unwinder.py
> > > * doc/python.texi (Writing a Frame Unwinder in Python): Add
> > > section.
> > > * python/lib/gdb/__init__.py (packages): Add frame_unwinders
> > > list.
> > > (execute_unwinders): New function.
> > > * python/lib/gdb/command/unwinders.py: New file.
> > > * python/lib/gdb/unwinder.py: New file.
> > > * python/py-objfile.c (objfile_object): Add frame_unwinders field.
> > > (objfpy_dealloc): Decrement frame_unwinders reference count.
> > > (objfpy_initialize): Create frame_unwinders list.
> > > (objfpy_get_frame_unwinders): New function.
> > > (objfpy_set_frame_unwinders): Ditto.
> > > (objfile_getset): Add frame_unwinders attribute to Objfile.
> > > * python/py-progspace.c (pspace_object): Add frame_unwinders field.
> > > (pspy_dealloc): Decrement frame_unwinders reference count.
> > > (pspy_initialize): Create frame_unwinders list.
> > > (pspy_get_frame_unwinders): New function.
> > > (pspy_set_frame_unwinders): Ditto.
> > > (pspy_getset): Add frame_unwinders attribute to gdb.Progspace.
> > > * python/py-unwind.c: New file.
> > > * python/python-internal.h (pspy_get_name_unwinders): New prototype.
> > > (objpy_get_frame_unwinders): New prototype.
> > > (gdbpy_initialize_unwind): New prototype.
> > > * python/python.c (gdbpy_apply_type_printers): Call
> > > gdbpy_initialize_unwind.
> > >
> > > gdb/testsuite/ChangeLog
> > >
> > > 2015-03-28 Sasha Smundak <asmundak@google.com>
> > >
> > > * gdb.python/py-unwind-maint.c: New file.
> > > * gdb.python/py-unwind-maint.exp: New test.
> > > * gdb.python/py-unwind-maint.py: New file.
> > > * gdb.python/py-unwind.c: New file.
> > > * gdb.python/py-unwind.exp: New test.
> > > * gdb.python/py-unwind.py: New test.
Thanks.
LGTM.
And thanks for your patience!