This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/3, not 2/4] musl: Move W_STOPCODE to common/gdb_wait.h.


Hi.

Sorry, I miscounted, the patch series as 3 patches, not 4 as
mentioned here: https://sourceware.org/ml/gdb-patches/2015-10/msg00495.html

2015-10-23  Doug Evans  <dje@google.com>

	* common/gdb_wait.h (W_STOPCODE): Define, moved here from
	gdbserver/linux-low.c.
	(WSETSTOP): Simplify.
	* gdbserver/linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.

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 ac8fae3..7482a2b 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]