[RFC - Python] New ObjFile event
Phil Muldoon
pmuldoon@redhat.com
Wed Mar 30 12:14:00 GMT 2011
Kevin Pouget <kevin.pouget@gmail.com> writes:
> Hello,
>
> here is a patch with all the modifications we discussed so far,
> including the ChangeLog entry and the new files
>
Really nice patch!
Just one tiny nit...
> gdb/ChangeLog | 28 +++++++++++++++
This is the ChangeLog for GDB code, so things in gdb/ and python/ code
related files have ChangeLog entries here.
> @@ -1,3 +1,31 @@
> +2011-03-29 Kevin Pouget <kevin.pouget@st.com>
> +
> + Allow Python notification of new object-file loadings
> + * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-newobjfilevent.c.
> + (SUBDIR_PYTHON_OBS): Add py-newobjfileevent.o.
> + Add build rule for this file.
> + * python/py-event.h (emit_new_objfile_event): New prototype.
> + (newobjfile): New Python event emitter.
> + * python/py-evts.c (gdbpy_initialize_py_events): Add newobjfile to
> + Python event registry.
> + * python/py-inferior.c: Include objfiles.h
> + (python_new_objfile): New function.
> + (gdbpy_initialize_inferior): Add python_new_objfile to the new objfile
> + observers.
> + * python/py-newobjfileevent.c: New file.
> + * python-internal.h (gdbpy_initialize_new_objfile_event): New
> + prototype.
> + (gdbpy_current_objfile): New global variable.
> + * python/python.c (gdbpy_current_objfile): Make global.
> + (_initialize_python): Add gdbpy_initialize_new_objfile_event call.
But the entries below belong in the testsuite/ChangeLog and without the
preceding "testsuite" in the log.
> + * testsuite/gdb.python/py-events-shlib.c: New file.
> + * testsuite/gdb.python/py-events.c (do_nothing): New global.
> + (main): Add call to shared library.
> + * testsuite/gdb.python/py-events.exp: Link the execfile to a shared
> + library and check newobjfile event notification.
> + * testsuite/gdb.python/py-events.py (new_objfile_handler): New Class.
> + (test_newobj_events): New class.
> +
I don't see a documentation entry. Similarly documentation entries are
added in the doc/ChangeLog
But this patch looks great. Tom or another maintainer will look at it
soon.
Cheers
Phil
More information about the Gdb-patches
mailing list