Change ptid_t::tid to ULONGEST
The ptid_t 'tid' member is normally used as an address in gdb -- both bsd-uthread and ravenscar-thread use it this way. However, because the type is 'long', this can cause problems with sign extension. This patch changes the type to ULONGEST to ensure that sign extension does not occur.
This commit is contained in:
parent
184ea2f731
commit
96bbe3ef96
9 changed files with 26 additions and 21 deletions
|
@ -296,7 +296,8 @@ PyObject *
|
|||
gdbpy_create_ptid_object (ptid_t ptid)
|
||||
{
|
||||
int pid;
|
||||
long tid, lwp;
|
||||
long lwp;
|
||||
ULONGEST tid;
|
||||
PyObject *ret;
|
||||
|
||||
ret = PyTuple_New (3);
|
||||
|
@ -313,7 +314,7 @@ gdbpy_create_ptid_object (ptid_t ptid)
|
|||
gdbpy_ref<> lwp_obj = gdb_py_object_from_longest (lwp);
|
||||
if (lwp_obj == nullptr)
|
||||
return nullptr;
|
||||
gdbpy_ref<> tid_obj = gdb_py_object_from_longest (tid);
|
||||
gdbpy_ref<> tid_obj = gdb_py_object_from_ulongest (tid);
|
||||
if (tid_obj == nullptr)
|
||||
return nullptr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue