summaryrefslogtreecommitdiffstats
path: root/package/gdb/7.7.1/0003-Add-some-casts-for-building-on-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/gdb/7.7.1/0003-Add-some-casts-for-building-on-musl.patch')
-rw-r--r--package/gdb/7.7.1/0003-Add-some-casts-for-building-on-musl.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/package/gdb/7.7.1/0003-Add-some-casts-for-building-on-musl.patch b/package/gdb/7.7.1/0003-Add-some-casts-for-building-on-musl.patch
new file mode 100644
index 0000000000..20652831bd
--- /dev/null
+++ b/package/gdb/7.7.1/0003-Add-some-casts-for-building-on-musl.patch
@@ -0,0 +1,72 @@
+From d41401ace01c234f42697e190a2ac95991780626 Mon Sep 17 00:00:00 2001
+From: Doug Evans <dje@google.com>
+Date: Mon, 26 Oct 2015 13:20:12 -0700
+Subject: [PATCH] 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.
+
+[Arnout: removed the parts that don't apply, including ChangeLog]
+Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
+---
+ gdb/ChangeLog | 5 +++++
+ gdb/gdbserver/ChangeLog | 6 ++++++
+ gdb/gdbserver/thread-db.c | 9 +++++----
+ gdb/linux-thread-db.c | 5 +++--
+ 4 files changed, 19 insertions(+), 6 deletions(-)
+
+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)
+ fprintf (stderr, "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,11 +319,11 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
+
+ if (debug_threads)
+ fprintf (stderr, "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);
+ linux_attach_lwp (ti_p->ti_lid);
+ lwp = find_lwp_pid (pid_to_ptid (ti_p->ti_lid));
+ if (lwp == NULL)
+ {
+ warning ("Could not attach to thread %ld (LWP %d)\n",
+- ti_p->ti_tid, ti_p->ti_lid);
++ (unsigned long) ti_p->ti_tid, ti_p->ti_lid);
+ return 0;
+ }
+
+
+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
+@@ -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;
+ }
+--
+1.9.4
+
OpenPOWER on IntegriCloud