From 3f77c7691fc5ff92eef90f39bb972f25c7422fb0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 29 Apr 2015 09:44:24 -0600 Subject: PR python/13598 - add before_prompt event This adds an event that is emitted just before GDB presents a prompt to the user. This provides Python code a way to react to whatever changes might have been made by the previous command. For example, in my GUI I use this to track changes to the selected frame and reflect them in the UI. Built and regtested on x86-64 Fedora 23. gdb/ChangeLog 2017-02-14 Tom Tromey PR python/13598: * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt event. * python/py-evts.c (gdbpy_initialize_py_events): Add before_prompt registry. * python/py-events.h (events_object) : New field. gdb/doc/ChangeLog 2017-02-14 Tom Tromey PR python/13598: * python.texi (Events In Python): Document events.before_prompt. gdb/testsuite/ChangeLog 2017-02-14 Tom Tromey PR python/13598: * gdb.python/py-events.exp: Add before_prompt event tests. --- gdb/doc/python.texi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/doc/python.texi') diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index d1cbadb..c3ea203 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -2981,6 +2981,10 @@ emitted, the @code{gdb.Breakpoint} object will already be in its invalid state; that is, the @code{is_valid} method will return @code{False}. +@item events.before_prompt +This event carries no payload. It is emitted each time @value{GDBN} +presents a prompt to the user. + @end table @node Threads In Python -- cgit v1.1