aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-param.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-param.c')
-rw-r--r--gdb/python/py-param.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c
index 2fe5be6..06b9ae9 100644
--- a/gdb/python/py-param.c
+++ b/gdb/python/py-param.c
@@ -662,7 +662,6 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
int parmclass, cmdtype;
PyObject *enum_values = NULL;
struct cmd_list_element **set_list, **show_list;
- volatile struct gdb_exception except;
if (! PyArg_ParseTuple (args, "sii|O", &name, &cmdtype, &parmclass,
&enum_values))
@@ -724,14 +723,14 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
Py_INCREF (self);
- TRY_CATCH (except, RETURN_MASK_ALL)
+ TRY
{
add_setshow_generic (parmclass, (enum command_class) cmdtype,
cmd_name, obj,
set_doc, show_doc,
doc, set_list, show_list);
}
- if (except.reason < 0)
+ CATCH (except, RETURN_MASK_ALL)
{
xfree (cmd_name);
xfree (set_doc);
@@ -743,6 +742,8 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
"%s", except.message);
return -1;
}
+ END_CATCH
+
return 0;
}