diff options
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-breakpoint.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c index 1edd556..752917c 100644 --- a/gdb/python/py-breakpoint.c +++ b/gdb/python/py-breakpoint.c @@ -927,14 +927,14 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs) char *label = NULL; char *source = NULL; char *function = NULL; - PyObject * qualified = NULL; + PyObject *qualified = Py_False; - if (!gdb_PyArg_ParseTupleAndKeywords (args, kwargs, "|siiOOsssOO", keywords, + if (!gdb_PyArg_ParseTupleAndKeywords (args, kwargs, "|siiOOsssOO!", keywords, &spec, &type, &access_type, &internal, &temporary, &source, &function, &label, &lineobj, - &qualified)) + &PyBool_Type, &qualified)) return -1; @@ -982,10 +982,11 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs) case bp_hardware_breakpoint: { location_spec_up locspec; + gdb_assert (PyBool_Check (qualified)); symbol_name_match_type func_name_match_type - = (qualified != NULL && PyObject_IsTrue (qualified) - ? symbol_name_match_type::FULL - : symbol_name_match_type::WILD); + = (qualified == Py_True + ? symbol_name_match_type::FULL + : symbol_name_match_type::WILD); if (spec != NULL) { |