** The gdb.MICommand.installed property can only be set to True or
False.
+ ** The 'qualified' argument to gdb.Breakpoint constructor will no
+ longer accept non-bool types.
+
* Debugger Adapter Protocol changes
** The "scopes" request will now return a scope holding global
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;
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)
{
$one_location_re \
"qualified true"
+ # Test qualified with a non-bool type.
+ delete_breakpoints
+ gdb_test \
+ "python gdb.Breakpoint(\"multiply\", qualified=None)" \
+ [multi_line \
+ "Python Exception <class 'TypeError'>: argument 10 must be bool, not None" \
+ "Error occurred in Python: argument 10 must be bool, not None"] \
+ "qualified non_bool_type"
+
# Test qualified=True with an explicit function.
delete_breakpoints
gdb_test \