Split TRY_CATCH into TRY + CATCH
[deliverable/binutils-gdb.git] / gdb / python / py-arch.c
index 49c654b0e2b15737510b98999301b4d2ddcc24c5..4fece397d1cf40c08539580d2515a957b1a4bae3 100644 (file)
@@ -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",
This page took 0.027776 seconds and 4 git commands to generate.