gdb: Fix ia64 defining TRAP_HWBKPT before including gdb_wait.h
authorJames Clarke <jrtc27@jrtc27.com>
Fri, 19 Jan 2018 17:22:49 +0000 (17:22 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 19 Jan 2018 18:17:54 +0000 (18:17 +0000)
On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
earlier; include it from linux-ptrace.h so it can never come afterwards.

gdb/ChangeLog:

* nat/linux-ptrace.c: Remove unnecessary reinclusion of
gdb_ptrace.h, and move including gdb_wait.h ...
* nat/linux-ptrace.h: ... to here.

gdb/ChangeLog
gdb/nat/linux-ptrace.c
gdb/nat/linux-ptrace.h

index 5467e89c60436c9e99dad0e3b4f533944fc1b857..e274caa4255cea9fcb9710ab2915aeb251fd99aa 100644 (file)
@@ -1,3 +1,9 @@
+2018-01-19  James Clarke  <jrtc27@jrtc27.com>
+
+       * nat/linux-ptrace.c: Remove unnecessary reinclusion of
+       gdb_ptrace.h, and move including gdb_wait.h ...
+       * nat/linux-ptrace.h: ... to here.
+
 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
 
        * inf-ptrace.c (inf_ptrace_detach): Adjust call to
index 5c4ddc959092e3b42bcca2fecbe96fc6e7320864..1f21ef03a39a992fd67d2e67a629545eabdbf696 100644 (file)
@@ -21,8 +21,6 @@
 #include "linux-procfs.h"
 #include "linux-waitpid.h"
 #include "buffer.h"
-#include "gdb_wait.h"
-#include "gdb_ptrace.h"
 #ifdef HAVE_SYS_PROCFS_H
 #include <sys/procfs.h>
 #endif
index 60967a3b6aa7f4bf6df6144629c9541d40981376..dc180fbf82a8ac22f7a97db711fdee696756e17b 100644 (file)
@@ -21,6 +21,7 @@
 struct buffer;
 
 #include "nat/gdb_ptrace.h"
+#include "gdb_wait.h"
 
 #ifdef __UCLIBC__
 #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))