diff options
Diffstat (limited to 'gdb/python/py-utils.c')
-rw-r--r-- | gdb/python/py-utils.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c index 58a5934..2e32f11 100644 --- a/gdb/python/py-utils.c +++ b/gdb/python/py-utils.c @@ -316,13 +316,16 @@ get_addr_from_python (PyObject *obj, CORE_ADDR *addr) { if (gdbpy_is_value_object (obj)) { - volatile struct gdb_exception except; - TRY_CATCH (except, RETURN_MASK_ALL) + TRY { *addr = value_as_address (value_object_to_value (obj)); } - GDB_PY_SET_HANDLE_EXCEPTION (except); + CATCH (except, RETURN_MASK_ALL) + { + GDB_PY_SET_HANDLE_EXCEPTION (except); + } + END_CATCH } else { |