diff options
Diffstat (limited to 'gdb/python/py-unwind.c')
-rw-r--r-- | gdb/python/py-unwind.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index f07a8d8..e506ec0 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -141,7 +141,7 @@ pyuw_value_obj_to_pointer (PyObject *pyo_value, CORE_ADDR *addr) int rc = 0; struct value *value; - TRY + try { if ((value = value_object_to_value (pyo_value)) != NULL) { @@ -150,11 +150,10 @@ pyuw_value_obj_to_pointer (PyObject *pyo_value, CORE_ADDR *addr) rc = 1; } } - CATCH (except, RETURN_MASK_ALL) + catch (const gdb_exception_RETURN_MASK_ALL &except) { gdbpy_convert_exception (except); } - END_CATCH return rc; } @@ -211,16 +210,15 @@ unwind_infopy_str (PyObject *self) stb.printf ("%s(%d, ", sep, reg.number); if (value != NULL) { - TRY + try { value_print (value, &stb, &opts); stb.puts (")"); } - CATCH (except, RETURN_MASK_ALL) + catch (const gdb_exception_RETURN_MASK_ALL &except) { GDB_PY_HANDLE_EXCEPTION (except); } - END_CATCH } else stb.puts ("<BAD>)"); @@ -346,16 +344,15 @@ pending_framepy_str (PyObject *self) if (frame == NULL) return PyString_FromString ("Stale PendingFrame instance"); - TRY + try { sp_str = core_addr_to_string_nz (get_frame_sp (frame)); pc_str = core_addr_to_string_nz (get_frame_pc (frame)); } - CATCH (except, RETURN_MASK_ALL) + catch (const gdb_exception_RETURN_MASK_ALL &except) { GDB_PY_HANDLE_EXCEPTION (except); } - END_CATCH return PyString_FromFormat ("SP=%s,PC=%s", sp_str, pc_str); } @@ -385,7 +382,7 @@ pending_framepy_read_register (PyObject *self, PyObject *args) return NULL; } - TRY + try { /* Fetch the value associated with a register, whether it's a real register or a so called "user" register, like "pc", @@ -398,11 +395,10 @@ pending_framepy_read_register (PyObject *self, PyObject *args) "Cannot read register %d from frame.", regnum); } - CATCH (except, RETURN_MASK_ALL) + catch (const gdb_exception_RETURN_MASK_ALL &except) { GDB_PY_HANDLE_EXCEPTION (except); } - END_CATCH return val == NULL ? NULL : value_to_value_object (val); } |