aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-inferior.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-07-26 19:09:35 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-07-26 19:09:35 +0000
commitf66713d24ad2c0a2e3d0e480119716f6d75a837e (patch)
treecbb5467f0238ff6228fee5e1138031f2bec8509c /gdb/python/py-inferior.c
parent8223e12c0883caa58d81f5ff6b7f1a17c7a53120 (diff)
downloadgdb-f66713d24ad2c0a2e3d0e480119716f6d75a837e.zip
gdb-f66713d24ad2c0a2e3d0e480119716f6d75a837e.tar.gz
gdb-f66713d24ad2c0a2e3d0e480119716f6d75a837e.tar.bz2
gdb/
* python/py-inferior.c (infpy_threads): Call update_thread_list (). gdb/testsuite/ * gdb.python/py-inferior.c (thread): New function. (check_threads): New function. (test_threads): New function. * gdb.python/py-inferior.exp: Added test. Replaced runto with continue to breakpoint.
Diffstat (limited to 'gdb/python/py-inferior.c')
-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;