aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2015-10-26 13:20:12 -0700
committerDoug Evans <dje@google.com>2015-10-26 13:20:12 -0700
commitd41401ace01c234f42697e190a2ac95991780626 (patch)
tree94ca1ecc21d2fb5caecf5d645723eaeb58782273 /gdb/linux-thread-db.c
parent1522597b057c321d813d3433bcd1e17c02a56557 (diff)
downloadgdb-d41401ace01c234f42697e190a2ac95991780626.zip
gdb-d41401ace01c234f42697e190a2ac95991780626.tar.gz
gdb-d41401ace01c234f42697e190a2ac95991780626.tar.bz2
Add some casts for building on musl.
gdb/ChangeLog: * linux-thread-db.c (find_new_threads_callback): Cast ti.ti_tid to unsigned long for debug_printf. (thread_db_pid_to_str): Ditto. gdb/gdbserver/ChangeLog: * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long for debug_printf. (attach_thread, find_new_threads_callback): Ditto.
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r--gdb/linux-thread-db.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 66e9595..41db29a 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1585,7 +1585,8 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
if (libthread_db_debug)
fprintf_unfiltered (gdb_stdlog,
"thread_db: skipping exited and "
- "joined thread (0x%lx)\n", ti.ti_tid);
+ "joined thread (0x%lx)\n",
+ (unsigned long) ti.ti_tid);
return 0;
}
@@ -1816,7 +1817,7 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid)
tid = thread_info->priv->tid;
snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)",
- tid, ptid_get_lwp (ptid));
+ (unsigned long) tid, ptid_get_lwp (ptid));
return buf;
}