mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 18:10:46 +00: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:
@@ -538,8 +538,9 @@ std::string
|
||||
bsd_uthread_target::pid_to_str (ptid_t ptid)
|
||||
{
|
||||
if (ptid.tid () != 0)
|
||||
return string_printf ("process %d, thread 0x%lx",
|
||||
ptid.pid (), ptid.tid ());
|
||||
return string_printf ("process %d, thread 0x%s",
|
||||
ptid.pid (),
|
||||
phex_nz (ptid.tid (), sizeof (ULONGEST)));
|
||||
|
||||
return normal_pid_to_str (ptid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user