This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] [PATCH] Provide the ability to write the frame unwinder in Python

This take revises the API by introducing UnwindInfo class. The main difference
with the proposed Guile interface is that previous frame registers are passed to
the constructor as a tuple and cannot be revised later.

2015-02-30  Sasha Smundak  <>

        * (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/ (PYTHON_FILE_LIST):  Add
        * doc/python.texi (Writing a Frame Unwinder in Python): Add
        * python/lib/gdb/ (packages): Add frame_sniffers list.
        * python/lib/gdb/command/ New file, implements GDB
        commands to list/enable/disable Python sniffers.
        * python/lib/gdb/function/ New file, implements
        execute_sniffers function.
        * python/lib/gdb/ New file, contains Sniffer class and
        register_sniffer function.
        * python/py-objfile.c (objfile_object): Add frame_sniffers field.
        (objfpy_dealloc): Decrement frame_sniffers reference count.
        (objfpy_initialize): Create frame_sniffers list.
        (objfpy_get_frame_sniffers): Implement Objfile.frame_sniffers
        (objfpy_set_frame_sniffers): Implement Objfile.frame_sniffers
        (objfile_getset): Add frame_sniffers attribute to Objfile.
        * python/py-progspace.c (pspace_object): Add frame_sniffers field.
        (pspy_dealloc): Decrement frame_sniffers reference count.
        (pspy_initialize): Create frame_sniffers list.
        (pspy_get_frame_sniffers): Implement gdb.Progspace.frame_sniffers
        (pspy_set_frame_sniffers): Implement gdb.Progspace.frame_sniffers
        (pspy_getset): Add frame_sniffers attribute to gdb.Progspace.
        * python/py-unwind.c: New file, implements Python frame sniffers
        * python/python-internal.h (pspy_get_name_sniffers): New prototype.
        (objpy_get_frame_sniffers): New prototype.
        (gdbpy_initialize_unwind): New prototype.
        * python/python.c (gdbpy_apply_type_printers): Call

2014-02-30  Sasha Smundak  <>

        * gdb.python/py-unwind-maint.c: Test program for py-unwind-maint.
        * gdb.python/py-unwind-maint.exp: Tests sniffer-related GDB
        * gdb.python/ Pythons sniffers for the test.

On Mon, Mar 9, 2015 at 4:02 AM, Phil Muldoon <> wrote:
> On 04/03/15 07:49, Andy Wingo wrote:
>> Howdy :)
>> Reordering some of the replies.
>> On Wed 04 Mar 2015 03:36, Alexander Smundak <> writes:
> Just a note. I am generally satisfied with the patch and your answers
> to my questions. Just now need to get the nod off Doug, and coordinate
> with Andy and/or other guile people to harmonious the design.
> Cheers
> Phil

Attachment: patch5.diff
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]