diff options
Diffstat (limited to 'gdb/python/py-prettyprint.c')
-rw-r--r-- | gdb/python/py-prettyprint.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index e678898c00..4d60c96fc9 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -48,6 +48,11 @@ search_pp_list (PyObject *list, PyObject *value) if (! function) return NULL; + /* Skip if disabled. */ + if (PyObject_HasAttr (function, gdbpy_enabled_cst) + && ! PyObject_IsTrue (PyObject_GetAttr (function, gdbpy_enabled_cst))) + continue; + printer = PyObject_CallFunctionObjArgs (function, value, NULL); if (! printer) return NULL; |