This is the mail archive of the gdb-patches@sourceware.org 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 - Python] New ObjFile event


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



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