aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-events.py
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python/py-events.py')
-rw-r--r--gdb/testsuite/gdb.python/py-events.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-events.py b/gdb/testsuite/gdb.python/py-events.py
index 1f0012a..9af768b 100644
--- a/gdb/testsuite/gdb.python/py-events.py
+++ b/gdb/testsuite/gdb.python/py-events.py
@@ -57,6 +57,11 @@ def new_objfile_handler (event):
print ("event type: new_objfile")
print ("new objfile name: %s" % (event.new_objfile.filename))
+def clear_objfiles_handler (event):
+ assert (isinstance (event, gdb.ClearObjFilesEvent))
+ print ("event type: clear_objfiles")
+ print ("progspace: %s" % (event.progspace.filename))
+
class test_events (gdb.Command):
"""Test events."""
@@ -80,6 +85,7 @@ class test_newobj_events (gdb.Command):
def invoke (self, arg, from_tty):
gdb.events.new_objfile.connect (new_objfile_handler)
+ gdb.events.clear_objfiles.connect (clear_objfiles_handler)
print ("Object file events registered.")
test_newobj_events ()