aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-infthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-infthread.c')
-rw-r--r--gdb/python/py-infthread.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c
index 9a9a2e6..4d0a020 100644
--- a/gdb/python/py-infthread.c
+++ b/gdb/python/py-infthread.c
@@ -147,15 +147,18 @@ static PyObject *
thpy_switch (PyObject *self, PyObject *args)
{
thread_object *thread_obj = (thread_object *) self;
- volatile struct gdb_exception except;
THPY_REQUIRE_VALID (thread_obj);
- TRY_CATCH (except, RETURN_MASK_ALL)
+ TRY
{
switch_to_thread (thread_obj->thread->ptid);
}
- GDB_PY_HANDLE_EXCEPTION (except);
+ CATCH (except, RETURN_MASK_ALL)
+ {
+ GDB_PY_HANDLE_EXCEPTION (except);
+ }
+ END_CATCH
Py_RETURN_NONE;
}