[PATCH v2 3/3] Add a way to temporarily set a gdb parameter from Python

Tom Tromey tromey@adacore.com
Thu Jan 13 19:46:00 GMT 2022


Lancelot>         try:
Lancelot>             yield
Lancelot>         finally:
Lancelot>             set_parameter(name, old_value)

Lancelot> This way, the parameter is restored even in case of exception, which is
Lancelot> what I would expect from a python user point of view.

Yeah, thanks.  I had assumed @contextmanager would handle this.
Anyway I'll make this change.

Tom


More information about the Gdb-patches mailing list