diff options
author | Doug Evans <dje@google.com> | 2015-10-26 13:20:12 -0700 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2015-10-26 13:20:12 -0700 |
commit | d41401ace01c234f42697e190a2ac95991780626 (patch) | |
tree | 94ca1ecc21d2fb5caecf5d645723eaeb58782273 /gdb/gdbserver | |
parent | 1522597b057c321d813d3433bcd1e17c02a56557 (diff) | |
download | gdb-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/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/thread-db.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 1b54dbd..4bcd7a5 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2015-10-26 Doug Evans <dje@google.com> + + * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long + for debug_printf. + (attach_thread, find_new_threads_callback): Ditto. + 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com> * mem-break.h (set_breakpoint_data): Remove. diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c index ffe722d..3df10ff 100644 --- a/gdb/gdbserver/thread-db.c +++ b/gdb/gdbserver/thread-db.c @@ -278,7 +278,7 @@ find_one_thread (ptid_t ptid) if (debug_threads) debug_printf ("Found thread %ld (LWP %d)\n", - ti.ti_tid, ti.ti_lid); + (unsigned long) ti.ti_tid, ti.ti_lid); if (lwpid != ti.ti_lid) { @@ -319,12 +319,12 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p) if (debug_threads) debug_printf ("Attaching to thread %ld (LWP %d)\n", - ti_p->ti_tid, ti_p->ti_lid); + (unsigned long) ti_p->ti_tid, ti_p->ti_lid); err = linux_attach_lwp (ptid); if (err != 0) { warning ("Could not attach to thread %ld (LWP %d): %s\n", - ti_p->ti_tid, ti_p->ti_lid, + (unsigned long) ti_p->ti_tid, ti_p->ti_lid, linux_ptrace_attach_fail_reason_string (ptid, err)); return 0; } @@ -392,7 +392,8 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data) glibc PR17707. */ if (debug_threads) debug_printf ("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; } |