/* GDB parameters implemented in Python
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
This file is part of GDB.
/* A union that can hold anything described by enum var_types. */
union parmpy_variable
{
- /* Hold an integer value, for boolean and integer types. */
+ /* Hold a boolean value. */
+ bool boolval;
+
+ /* Hold an integer value. */
int intval;
/* Hold an auto_boolean. */
cmp = PyObject_IsTrue (value);
if (cmp < 0)
return -1;
- self->value.intval = cmp;
+ self->value.boolval = cmp;
break;
case var_auto_boolean:
case var_boolean:
add_setshow_boolean_cmd (cmd_name, cmdclass,
- &self->value.intval, set_doc, show_doc,
+ &self->value.boolval, set_doc, show_doc,
help_doc, get_set_value, get_show_value,
set_list, show_list);
set_doc.get (), show_doc.get (),
doc.get (), set_list, show_list);
}
- catch (const gdb_exception_RETURN_MASK_ALL &except)
+ catch (const gdb_exception &except)
{
xfree (cmd_name);
Py_DECREF (self);