aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2021-02-24 14:35:07 -0700
committerKevin Buettner <kevinb@redhat.com>2021-02-24 14:35:07 -0700
commit268c77c1b0cc5d82c894af6e3e4f040c1bd4644e (patch)
tree66fc9aab67873bae273bacd1fe67e23baa70b9f8 /gdb/nat
parent665af52ec2a52184d39a76d6e724fa4733dbab3c (diff)
downloadgdb-268c77c1b0cc5d82c894af6e3e4f040c1bd4644e.zip
gdb-268c77c1b0cc5d82c894af6e3e4f040c1bd4644e.tar.gz
gdb-268c77c1b0cc5d82c894af6e3e4f040c1bd4644e.tar.bz2
Add comment regarding include order of <sys/ptrace.h> and <asm/ptrace.h>
gdb/ChangeLog: * nat/aarch64-linux-hw-point.c: Add comment regarding include order for <sys/ptrace.h> and <asm/ptrace.h>.
Diffstat (limited to 'gdb/nat')
-rw-r--r--gdb/nat/aarch64-linux-hw-point.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c
index 0278ac2..af2cc42 100644
--- a/gdb/nat/aarch64-linux-hw-point.c
+++ b/gdb/nat/aarch64-linux-hw-point.c
@@ -23,8 +23,15 @@
#include "aarch64-linux-hw-point.h"
#include <sys/uio.h>
+
+/* The order in which <sys/ptrace.h> and <asm/ptrace.h> are included
+ can be important. <sys/ptrace.h> often declares various PTRACE_*
+ enums. <asm/ptrace.h> often defines preprocessor constants for
+ these very same symbols. When that's the case, build errors will
+ result when <asm/ptrace.h> is included before <sys/ptrace.h>. */
#include <sys/ptrace.h>
#include <asm/ptrace.h>
+
#include <elf.h>
/* Number of hardware breakpoints/watchpoints the target supports.