This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/1] gdb, python: update threads in Inferior.threads ()
- From: markus dot t dot metzger at intel dot com
- To: gdb-patches at sourceware dot org
- Cc: markus dot t dot metzger at gmail dot com, Markus Metzger <markus dot t dot metzger at intel dot com>
- Date: Fri, 6 Jul 2012 11:49:31 +0200
- Subject: [PATCH 1/1] gdb, python: update threads in Inferior.threads ()
From: Markus Metzger <markus.t.metzger@intel.com>
When querying an inferior's threads in Python in a remote debugging
configuration, only the already known threads are returned.
Update the thread list in infpy_threads () before creating the Python objects.
Not sure this is the right place. We should probably update the thread list as
soon as we learn that the target stopped.
2012-07-06 Markus Metzger <markus.t.metzger@intel.com>
gdb/python/
* py-inferior.c (infpy_threads): Call update_thread_list ().
---
gdb/python/py-inferior.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index 2b229be..ef28c33 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -303,6 +303,8 @@ infpy_threads (PyObject *self, PyObject *args)
INFPY_REQUIRE_VALID (inf_obj);
+ update_thread_list ();
+
tuple = PyTuple_New (inf_obj->nthreads);
if (!tuple)
return NULL;
--
1.7.1