aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-inferior.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-04-24 19:26:04 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-04-24 19:26:41 -0400
commitc90e7d6352b2e16ac007d08b2e03ae10081147b5 (patch)
tree2ca6bb8a1d338ff48f2eed24dcb25300e4204f54 /gdb/python/py-inferior.c
parentec098003e27d67bca9e9880320e26ab8ad30fe31 (diff)
downloadbinutils-c90e7d6352b2e16ac007d08b2e03ae10081147b5.zip
binutils-c90e7d6352b2e16ac007d08b2e03ae10081147b5.tar.gz
binutils-c90e7d6352b2e16ac007d08b2e03ae10081147b5.tar.bz2
gdbsupport, gdb: give names to observers
Give a name to each observer, this will help produce more meaningful debug message. gdbsupport/ChangeLog: * observable.h (class observable) <struct observer> <observer>: Add name parameter. <name>: New field. <attach>: Add name parameter, update all callers. Change-Id: Ie0cc4664925215b8d2b09e026011b7803549fba0
Diffstat (limited to 'gdb/python/py-inferior.c')
-rw-r--r--gdb/python/py-inferior.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index a3d5952..c2861cc 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -904,18 +904,23 @@ gdbpy_initialize_inferior (void)
infpy_inf_data_key =
register_inferior_data_with_cleanup (NULL, py_free_inferior);
- gdb::observers::new_thread.attach (add_thread_object);
- gdb::observers::thread_exit.attach (delete_thread_object);
- gdb::observers::normal_stop.attach (python_on_normal_stop);
- gdb::observers::target_resumed.attach (python_on_resume);
- gdb::observers::inferior_call_pre.attach (python_on_inferior_call_pre);
- gdb::observers::inferior_call_post.attach (python_on_inferior_call_post);
- gdb::observers::memory_changed.attach (python_on_memory_change);
- gdb::observers::register_changed.attach (python_on_register_change);
- gdb::observers::inferior_exit.attach (python_inferior_exit);
- gdb::observers::new_objfile.attach (python_new_objfile);
- gdb::observers::inferior_added.attach (python_new_inferior);
- gdb::observers::inferior_removed.attach (python_inferior_deleted);
+ gdb::observers::new_thread.attach (add_thread_object, "py-inferior");
+ gdb::observers::thread_exit.attach (delete_thread_object, "py-inferior");
+ gdb::observers::normal_stop.attach (python_on_normal_stop, "py-inferior");
+ gdb::observers::target_resumed.attach (python_on_resume, "py-inferior");
+ gdb::observers::inferior_call_pre.attach (python_on_inferior_call_pre,
+ "py-inferior");
+ gdb::observers::inferior_call_post.attach (python_on_inferior_call_post,
+ "py-inferior");
+ gdb::observers::memory_changed.attach (python_on_memory_change,
+ "py-inferior");
+ gdb::observers::register_changed.attach (python_on_register_change,
+ "py-inferior");
+ gdb::observers::inferior_exit.attach (python_inferior_exit, "py-inferior");
+ gdb::observers::new_objfile.attach (python_new_objfile, "py-inferior");
+ gdb::observers::inferior_added.attach (python_new_inferior, "py-inferior");
+ gdb::observers::inferior_removed.attach (python_inferior_deleted,
+ "py-inferior");
membuf_object_type.tp_new = PyType_GenericNew;
if (PyType_Ready (&membuf_object_type) < 0)