aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-09-16 13:55:04 -0600
committerTom Tromey <tromey@adacore.com>2021-09-23 09:30:54 -0600
commit96bbe3ef9653e23a17b2315627e0cab441815f2d (patch)
treecf9ac694a99f0ae9755d3229767a905476a69c00 /gdb/remote.c
parent184ea2f7316c54dd5e0fa84f1fe07a222e8fb44c (diff)
downloadgdb-96bbe3ef9653e23a17b2315627e0cab441815f2d.zip
gdb-96bbe3ef9653e23a17b2315627e0cab441815f2d.tar.gz
gdb-96bbe3ef9653e23a17b2315627e0cab441815f2d.tar.bz2
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.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 49ed209..3ece443 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -6907,8 +6907,9 @@ remote_target::remote_stop_ns (ptid_t ptid)
== resume_state::RESUMED_PENDING_VCONT)
{
remote_debug_printf ("Enqueueing phony stop reply for thread pending "
- "vCont-resume (%d, %ld, %ld)", tp->ptid.pid(),
- tp->ptid.lwp (), tp->ptid.tid ());
+ "vCont-resume (%d, %ld, %s)", tp->ptid.pid(),
+ tp->ptid.lwp (),
+ pulongest (tp->ptid.tid ()));
/* Check that the thread wasn't resumed with a signal.
Generating a phony stop would result in losing the