aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/python.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c
index b0de48d..397431a 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1810,7 +1810,9 @@ gdbpy_handle_missing_debuginfo (const struct extension_language_defn *extlang,
if (PyBool_Check (pyo_execute_ret.get ()))
{
- bool try_again = PyObject_IsTrue (pyo_execute_ret.get ());
+ /* We know the value is a bool, so it must be either Py_True or
+ Py_False. Anything else would not get past the above check. */
+ bool try_again = pyo_execute_ret.get () == Py_True;
return ext_lang_missing_file_result (try_again);
}