aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-breakpoint.c2
-rw-r--r--gdb/python/py-finishbreakpoint.c2
-rw-r--r--gdb/python/py-infthread.c7
3 files changed, 7 insertions, 4 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 640ec1b..85b17d5 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -203,7 +203,7 @@ bppy_set_thread (PyObject *self, PyObject *newvalue, void *closure)
if (! gdb_py_int_as_long (newvalue, &id))
return -1;
- if (! valid_thread_id (id))
+ if (!valid_global_thread_id (id))
{
PyErr_SetString (PyExc_RuntimeError,
_("Invalid thread ID."));
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index 38cf293..bff6dba 100644
--- a/gdb/python/py-finishbreakpoint.c
+++ b/gdb/python/py-finishbreakpoint.c
@@ -221,7 +221,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
if (PyErr_Occurred ())
return -1;
- thread = pid_to_thread_id (inferior_ptid);
+ thread = ptid_to_global_thread_id (inferior_ptid);
if (thread == 0)
{
PyErr_SetString (PyExc_ValueError,
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,