From: Doug Evans Date: Mon, 26 Oct 2015 20:24:01 +0000 (-0700) Subject: musl: Move W_STOPCODE to common/gdb_wait.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=963843d4d07aef6caa296dacf191f8adc9518596;p=binutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 79c8e8ee22f..9806a42d6e7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2015-10-26 Doug Evans + + * common/gdb_wait.h (W_STOPCODE): Define, moved here from + gdbserver/linux-low.c. + (WSETSTOP): Simplify. + 2015-10-26 Doug Evans * linux-thread-db.c (find_new_threads_callback): Ditto. diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h index 9b250d250ae..412f8131212 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/ChangeLog b/gdb/gdbserver/ChangeLog index 4bcd7a5748a..99973bf24db 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2015-10-26 Doug Evans + + * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h. + 2015-10-26 Doug Evans * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 0c552b8f524..7ed67c7dc51 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