mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user