aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-arch.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-arch.c')
-rw-r--r--gdb/python/py-arch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/python/py-arch.c b/gdb/python/py-arch.c
index 49c654b..4fece39 100644
--- a/gdb/python/py-arch.c
+++ b/gdb/python/py-arch.c
@@ -199,7 +199,6 @@ archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
char *as = NULL;
struct ui_file *memfile = mem_fileopen ();
PyObject *insn_dict = PyDict_New ();
- volatile struct gdb_exception except;
if (insn_dict == NULL)
{
@@ -217,11 +216,11 @@ archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
return NULL; /* PyList_Append Sets the exception. */
}
- TRY_CATCH (except, RETURN_MASK_ALL)
+ TRY
{
insn_len = gdb_print_insn (gdbarch, pc, memfile, NULL);
}
- if (except.reason < 0)
+ CATCH (except, RETURN_MASK_ALL)
{
Py_DECREF (result_list);
ui_file_delete (memfile);
@@ -229,6 +228,7 @@ archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
gdbpy_convert_exception (except);
return NULL;
}
+ END_CATCH
as = ui_file_xstrdup (memfile, NULL);
if (PyDict_SetItemString (insn_dict, "addr",