aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-08-28 16:22:36 +0100
committerAndrew Burgess <aburgess@redhat.com>2023-09-28 15:33:13 +0100
commit42f297ad36a13a7774fede3a8119e6c56ef6d318 (patch)
tree9d5ef57d0ec2eb14ce05975b670e8fce7628c99e /gdb/NEWS
parent063453b199e1291a03ee81c3422c31d7cca60af6 (diff)
downloadfsf-binutils-gdb-42f297ad36a13a7774fede3a8119e6c56ef6d318.zip
fsf-binutils-gdb-42f297ad36a13a7774fede3a8119e6c56ef6d318.tar.gz
fsf-binutils-gdb-42f297ad36a13a7774fede3a8119e6c56ef6d318.tar.bz2
gdb/python: make the executable_changed event available from Python
This commit makes the executable_changed observable available through the Python API as an event. There's nothing particularly interesting going on here, it just follows the same pattern as many of the other Python events we support. The new event registry is called events.executable_changed, and this emits an ExecutableChangedEvent object which has two attributes, a gdb.Progspace called 'progspace', this is the program space in which the executable changed, and a Boolean called 'reload', which is True if the same executable changed on disk and has been reloaded, or is False when a new executable has been loaded. One interesting thing did come up during testing though, you'll notice the test contains a setup_kfail call. During testing I observed that the executable_changed event would trigger twice when GDB restarted an inferior. However, the ExecutableChangedEvent object is identical for both calls, so the wrong information is never sent out, we just see one too many events. I tracked this down to how the reload_symbols function (symfile.c) takes care to also reload the executable, however, I've split fixing this into a separate commit, so see the next commit for details. Reviewed-By: Eli Zaretskii <eliz@gnu.org> Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 2d57f52..fd7ab28 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -310,6 +310,11 @@ show tui mouse-events
file name will have been partially resolved to an absolute file
name.
+ ** A new executable_changed event registry is available. This event
+ emits ExecutableChangedEvent objects, which have 'progspace' (a
+ gdb.Progspace) and 'reload' (a Boolean) attributes. This event
+ is emitted when gdb.Progspace.executable_filename changes.
+
*** Changes in GDB 13
* MI version 1 is deprecated, and will be removed in GDB 14.