aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-unwind.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-unwind.c')
-rw-r--r--gdb/python/py-unwind.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index d83979b..1856e41 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -969,23 +969,9 @@ pyuw_on_new_gdbarch (struct gdbarch *newarch)
}
}
-void _initialize_py_unwind ();
-void
-_initialize_py_unwind ()
-{
- add_setshow_boolean_cmd
- ("py-unwind", class_maintenance, &pyuw_debug,
- _("Set Python unwinder debugging."),
- _("Show Python unwinder debugging."),
- _("When on, Python unwinder debugging is enabled."),
- NULL,
- show_pyuw_debug,
- &setdebuglist, &showdebuglist);
-}
-
/* Initialize unwind machinery. */
-int
+static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_unwind (void)
{
gdb::observers::architecture_changed.attach (pyuw_on_new_gdbarch,
@@ -1004,6 +990,24 @@ gdbpy_initialize_unwind (void)
(PyObject *) &unwind_info_object_type);
}
+void _initialize_py_unwind ();
+void
+_initialize_py_unwind ()
+{
+ add_setshow_boolean_cmd
+ ("py-unwind", class_maintenance, &pyuw_debug,
+ _("Set Python unwinder debugging."),
+ _("Show Python unwinder debugging."),
+ _("When on, Python unwinder debugging is enabled."),
+ NULL,
+ show_pyuw_debug,
+ &setdebuglist, &showdebuglist);
+}
+
+GDBPY_INITIALIZE_FILE (gdbpy_initialize_unwind);
+
+
+
static PyMethodDef pending_frame_object_methods[] =
{
{ "read_register", (PyCFunction) pending_framepy_read_register,