mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
Change get_ada_task_ptid parameter type
get_ada_task_ptid currently takes a 'long' as its 'thread' parameter type. However, on some platforms this is actually a pointer, and using 'long' can sometimes end up with the value being sign-extended. This sign extension can cause problems later, if the tid is then later used as an address again. This patch changes the parameter type to ULONGEST and updates all the uses. This approach preserves sign extension on the targets where it is apparently intended, while avoiding it on others. Co-Authored-By: John Baldwin <jhb@FreeBSD.org>
This commit is contained in:
@ -1045,8 +1045,8 @@ fbsd_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
|
||||
return;
|
||||
#endif
|
||||
|
||||
fbsd_lwp_debug_printf ("ptid (%d, %ld, %ld)", ptid.pid (), ptid.lwp (),
|
||||
ptid.tid ());
|
||||
fbsd_lwp_debug_printf ("ptid (%d, %ld, %s)", ptid.pid (), ptid.lwp (),
|
||||
pulongest (ptid.tid ()));
|
||||
if (ptid.lwp_p ())
|
||||
{
|
||||
/* If ptid is a specific LWP, suspend all other LWPs in the process. */
|
||||
|
Reference in New Issue
Block a user