diff options
author | Kevin Buettner <kevinb@redhat.com> | 2021-02-24 14:35:07 -0700 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2021-02-24 14:35:07 -0700 |
commit | 268c77c1b0cc5d82c894af6e3e4f040c1bd4644e (patch) | |
tree | 66fc9aab67873bae273bacd1fe67e23baa70b9f8 /gdb | |
parent | 665af52ec2a52184d39a76d6e724fa4733dbab3c (diff) | |
download | binutils-268c77c1b0cc5d82c894af6e3e4f040c1bd4644e.zip binutils-268c77c1b0cc5d82c894af6e3e4f040c1bd4644e.tar.gz binutils-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')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/nat/aarch64-linux-hw-point.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f705242..2305512 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2021-02-24 Kevin Buettner <kevinb@redhat.com> + * nat/aarch64-linux-hw-point.c: Add comment regarding include + order for <sys/ptrace.h> and <asm/ptrace.h>. + +2021-02-24 Kevin Buettner <kevinb@redhat.com> + * nat/aarch64-linux-hw-point.c: Include <asm/ptrace.h> after <sys/ptrace.h>. 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. |