aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-inferior.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index 2b229be..907b73e 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -300,9 +300,14 @@ infpy_threads (PyObject *self, PyObject *args)
struct threadlist_entry *entry;
inferior_object *inf_obj = (inferior_object *) self;
PyObject *tuple;
+ volatile struct gdb_exception except;
INFPY_REQUIRE_VALID (inf_obj);
+ TRY_CATCH (except, RETURN_MASK_ALL)
+ update_thread_list ();
+ GDB_PY_HANDLE_EXCEPTION (except);
+
tuple = PyTuple_New (inf_obj->nthreads);
if (!tuple)
return NULL;