aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-block.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-block.c')
-rw-r--r--gdb/python/py-block.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index fb6a6b6..6c0f5cb 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -373,19 +373,22 @@ gdbpy_block_for_pc (PyObject *self, PyObject *args)
gdb_py_ulongest pc;
const struct block *block = NULL;
struct compunit_symtab *cust = NULL;
- volatile struct gdb_exception except;
if (!PyArg_ParseTuple (args, GDB_PY_LLU_ARG, &pc))
return NULL;
- TRY_CATCH (except, RETURN_MASK_ALL)
+ TRY
{
cust = find_pc_compunit_symtab (pc);
if (cust != NULL && COMPUNIT_OBJFILE (cust) != NULL)
block = block_for_pc (pc);
}
- GDB_PY_HANDLE_EXCEPTION (except);
+ CATCH (except, RETURN_MASK_ALL)
+ {
+ GDB_PY_HANDLE_EXCEPTION (except);
+ }
+ END_CATCH
if (cust == NULL || COMPUNIT_OBJFILE (cust) == NULL)
{