aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.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/infrun.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/infrun.c')
-rw-r--r--gdb/infrun.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index d1ac9b4..9567130 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -4646,11 +4646,9 @@ wait_one ()
static void
save_waitstatus (struct thread_info *tp, const target_waitstatus *ws)
{
- infrun_debug_printf ("saving status %s for %d.%ld.%ld",
+ infrun_debug_printf ("saving status %s for %s",
target_waitstatus_to_string (ws).c_str (),
- tp->ptid.pid (),
- tp->ptid.lwp (),
- tp->ptid.tid ());
+ tp->ptid.to_string ().c_str ());
/* Record for later. */
tp->set_pending_waitstatus (*ws);
@@ -4845,9 +4843,9 @@ handle_one (const wait_one_event &event)
struct regcache *regcache;
infrun_debug_printf
- ("target_wait %s, saving status for %d.%ld.%ld",
+ ("target_wait %s, saving status for %s",
target_waitstatus_to_string (&event.ws).c_str (),
- t->ptid.pid (), t->ptid.lwp (), t->ptid.tid ());
+ t->ptid.to_string ().c_str ());
/* Record for later. */
save_waitstatus (t, &event.ws);