diff options
Diffstat (limited to 'gdb/python/py-inferior.c')
-rw-r--r-- | gdb/python/py-inferior.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index febd2a7..94c2c23 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -892,6 +892,14 @@ gdbpy_selected_inferior (PyObject *self, PyObject *args) inferior_to_inferior_object (current_inferior ()).release ()); } +void _initialize_py_inferior (); +void +_initialize_py_inferior () +{ + infpy_inf_data_key = + register_inferior_data_with_cleanup (NULL, py_free_inferior); +} + int gdbpy_initialize_inferior (void) { @@ -902,9 +910,6 @@ gdbpy_initialize_inferior (void) (PyObject *) &inferior_object_type) < 0) return -1; - infpy_inf_data_key = - register_inferior_data_with_cleanup (NULL, py_free_inferior); - 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"); |