diff options
Diffstat (limited to 'gdb/python/py-infthread.c')
-rw-r--r-- | gdb/python/py-infthread.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c index 5075071..a9dd5cb 100644 --- a/gdb/python/py-infthread.c +++ b/gdb/python/py-infthread.c @@ -115,6 +115,8 @@ thpy_set_name (PyObject *self, PyObject *newvalue, void *ignore) return 0; } +/* Getter for InferiorThread.num. */ + static PyObject * thpy_get_num (PyObject *self, void *closure) { @@ -122,7 +124,7 @@ thpy_get_num (PyObject *self, void *closure) THPY_REQUIRE_VALID (thread_obj); - return PyLong_FromLong (thread_obj->thread->num); + return PyLong_FromLong (thread_obj->thread->per_inf_num); } /* Getter for InferiorThread.ptid -> (pid, lwp, tid). @@ -294,7 +296,8 @@ static PyGetSetDef thread_object_getset[] = { { "name", thpy_get_name, thpy_set_name, "The name of the thread, as set by the user or the OS.", NULL }, - { "num", thpy_get_num, NULL, "ID of the thread, as assigned by GDB.", NULL }, + { "num", thpy_get_num, NULL, + "Per-inferior number of the thread, as assigned by GDB.", NULL }, { "ptid", thpy_get_ptid, NULL, "ID of the thread, as assigned by the OS.", NULL }, { "inferior", thpy_get_inferior, NULL, |