diff options
Diffstat (limited to 'gdb/python/lib')
-rw-r--r-- | gdb/python/lib/gdb/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/python/lib/gdb/__init__.py b/gdb/python/lib/gdb/__init__.py index 17ee6a1..9e9978e 100644 --- a/gdb/python/lib/gdb/__init__.py +++ b/gdb/python/lib/gdb/__init__.py @@ -239,6 +239,13 @@ def find_pc_line(pc): def set_parameter(name, value): """Set the GDB parameter NAME to VALUE.""" + # Handle the specific case of booleans here, because gdb.parameter + # can return them, but they can't be passed to 'set' this way. + if isinstance(value, bool): + if value: + value = 'on' + else: + value = 'off' execute("set " + name + " " + str(value), to_string=True) |