From f66713d24ad2c0a2e3d0e480119716f6d75a837e Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 26 Jul 2012 19:09:35 +0000 Subject: 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. --- gdb/python/py-inferior.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/python') 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; -- cgit v1.1