kumquat-buildroot/package/gdb/7.10.1/0002-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch
Arnout Vandecappelle 07408bbf10 gdb: add upstream patches to fix musl build
Backported three patches from upstream to all four versions of gdb
that we support.

The "skipping exited and joined thread" message only exists in 7.10.1
so that hunk is removed in the earlier versions. The ChangeLog
modifications are also removed.

Fixes
http://autobuild.buildroot.net/results/e81/e8156d0b89e7157b8f10e428fc0958b0eb29e50a/

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-05 15:14:40 +01:00

64 lines
1.6 KiB
Diff

From 963843d4d07aef6caa296dacf191f8adc9518596 Mon Sep 17 00:00:00 2001
From: Doug Evans <dje@google.com>
Date: Mon, 26 Oct 2015 13:24:01 -0700
Subject: [PATCH] musl: Move W_STOPCODE to common/gdb_wait.h.
gdb/ChangeLog:
* common/gdb_wait.h (W_STOPCODE): Define, moved here from
gdbserver/linux-low.c.
(WSETSTOP): Simplify.
gdb/gdbserver/ChangeLog:
* linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
[Arnout: removed the parts that don't apply, including ChangeLog]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
gdb/ChangeLog | 6 ++++++
gdb/common/gdb_wait.h | 8 ++++----
gdb/gdbserver/ChangeLog | 4 ++++
gdb/gdbserver/linux-low.c | 4 ----
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h
index 9b250d2..412f813 100644
--- a/gdb/common/gdb_wait.h
+++ b/gdb/common/gdb_wait.h
@@ -85,12 +85,12 @@
# endif
#endif
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
+
#ifndef WSETSTOP
-# ifdef W_STOPCODE
#define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig))
-# else
-#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8)))
-# endif
#endif
/* For native GNU/Linux we may use waitpid and the __WCLONE option.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 0c552b8..7ed67c7 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -70,10 +70,6 @@
#define O_LARGEFILE 0
#endif
-#ifndef W_STOPCODE
-#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
-#endif
-
/* This is the kernel's hard limit. Not to be confused with
SIGRTMIN. */
#ifndef __SIGRTMIN
--
1.9.4