/* The debug method list. */
PyObject *xmethods;
+
+ /* The missing debug handler list. */
+ PyObject *missing_debug_handlers;
};
extern PyTypeObject pspace_object_type
Py_XDECREF (ps_self->frame_unwinders);
Py_XDECREF (ps_self->type_printers);
Py_XDECREF (ps_self->xmethods);
+ Py_XDECREF (ps_self->missing_debug_handlers);
Py_TYPE (self)->tp_free (self);
}
if (self->xmethods == NULL)
return 0;
+ self->missing_debug_handlers = PyList_New (0);
+ if (self->missing_debug_handlers == nullptr)
+ return 0;
+
return 1;
}
return self->xmethods;
}
+/* Return the list of missing debug handlers for this program space. */
+
+static PyObject *
+pspy_get_missing_debug_handlers (PyObject *o, void *ignore)
+{
+ pspace_object *self = (pspace_object *) o;
+
+ Py_INCREF (self->missing_debug_handlers);
+ return self->missing_debug_handlers;
+}
+
+/* Set this program space's list of missing debug handlers to HANDLERS. */
+
+static int
+pspy_set_missing_debug_handlers (PyObject *o, PyObject *handlers,
+ void *ignore)
+{
+ pspace_object *self = (pspace_object *) o;
+
+ if (handlers == nullptr)
+ {
+ PyErr_SetString (PyExc_TypeError,
+ "cannot delete the missing debug handlers list");
+ return -1;
+ }
+
+ if (!PyList_Check (handlers))
+ {
+ PyErr_SetString (PyExc_TypeError,
+ "the missing debug handlers attribute must be a list");
+ return -1;
+ }
+
+ /* Take care in case the LHS and RHS are related somehow. */
+ gdbpy_ref<> tmp (self->missing_debug_handlers);
+ Py_INCREF (handlers);
+ self->missing_debug_handlers = handlers;
+
+ return 0;
+}
+
/* Set the 'type_printers' attribute. */
static int
"Type printers.", NULL },
{ "xmethods", pspy_get_xmethods, NULL,
"Debug methods.", NULL },
+ { "missing_debug_handlers", pspy_get_missing_debug_handlers,
+ pspy_set_missing_debug_handlers, "Missing debug handlers.", NULL },
{ NULL }
};