From: Gary Benson Date: Fri, 12 Sep 2014 09:57:46 +0000 (+0100) Subject: Clarify GDBSERVER use in linux-waitpid.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b006a80e5f41125c876a60a143ad421113533efc;p=binutils-gdb.git Clarify GDBSERVER use in linux-waitpid.c This commit makes linux-waitpid.c include common-defs.h. GDB's inclusion of defs.h is removed, but gdbserver's inclusion of server.h remains to support some gdbserver-specific debug code that cannot presently be merged. A new FIXME documents this. gdb/ChangeLog: * nat/linux-waitpid.c: Include common-defs.h. [GDBSERVER]: Add FIXME comment. [!GDBSERVER]: Don't include defs.h or signal.h. (linux_debug) [!GDBSERVER]: Remove empty block. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e2f33351aa9..56f676dc118 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2014-09-12 Gary Benson + + * nat/linux-waitpid.c: Include common-defs.h. + [GDBSERVER]: Add FIXME comment. + [!GDBSERVER]: Don't include defs.h or signal.h. + (linux_debug) [!GDBSERVER]: Remove empty block. + 2014-09-12 Gary Benson * nat/x86-dregs.c: Include common-defs.h and break-common.h. diff --git a/gdb/nat/linux-waitpid.c b/gdb/nat/linux-waitpid.c index 53847ac0518..04cdc3d5cef 100644 --- a/gdb/nat/linux-waitpid.c +++ b/gdb/nat/linux-waitpid.c @@ -17,11 +17,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include "common-defs.h" + #ifdef GDBSERVER +/* FIXME: server.h is required for the definition of debug_threads + which is used in the gdbserver-specific debug printing in + linux_debug. This code should be made available to GDB also, + but the lack of a suitable flag to enable it prevents this. */ #include "server.h" -#else -#include "defs.h" -#include "signal.h" #endif #include "linux-nat.h" @@ -42,8 +45,6 @@ linux_debug (const char *format, ...) vfprintf (stderr, format, args); va_end (args); } -#else - /* GDB-specific debugging output. */ #endif }