summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2018-04-12 17:55:08 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-07 15:57:43 +0100
commit76ffc6b7e5ff6f2bab6e53bb07f52a25fcb81ac9 (patch)
tree7dcfdd8fb977adc38dfe36962301a950b24a13a8
parent4b15cf9c62148817af924baa7e9ee611b0385353 (diff)
downloadpoky-76ffc6b7e5ff6f2bab6e53bb07f52a25fcb81ac9.tar.gz
gdb: fix header ordering for TRAP_HWBKPT
This error can appear in gdb/nat/linux-ptrace.c because of the order in which some headers are processed: | In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0: | ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier before numeric constant | # define TRAP_HWBKPT 4 | ^ | Makefile:2357: recipe for target 'linux-ptrace.o' failed | make[2]: *** [linux-ptrace.o] Error 1 | make[2]: *** Waiting for unfinished jobs.... | make[2]: Leaving directory '/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb' | Makefile:8822: recipe for target 'all-gdb' failed | make[1]: *** [all-gdb] Error 2 | make[1]: Leaving directory '/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux' | Makefile:846: recipe for target 'all' failed | make: *** [all] Error 2 A patch from GDB's current master solves the issue. (From OE-Core rev: 4aaf747099714ec11158571527396ed9e818729e) (From OE-Core rev: 463e512a027966123ec113b7507eb5e55a19b072) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gdb/gdb-7.12.1.inc1
-rw-r--r--meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch53
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-7.12.1.inc b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
index 634756ce45..1d81185a0a 100644
--- a/meta/recipes-devtools/gdb/gdb-7.12.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
16 file://0009-Change-order-of-CFLAGS.patch \ 16 file://0009-Change-order-of-CFLAGS.patch \
17 file://0010-resolve-restrict-keyword-conflict.patch \ 17 file://0010-resolve-restrict-keyword-conflict.patch \
18 file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \ 18 file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \
19 file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
19" 20"
20SRC_URI[md5sum] = "193453347ddced7acb6b1cd2ee8f2e4b" 21SRC_URI[md5sum] = "193453347ddced7acb6b1cd2ee8f2e4b"
21SRC_URI[sha256sum] = "4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186" 22SRC_URI[sha256sum] = "4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186"
diff --git a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
new file mode 100644
index 0000000000..9bf99f6beb
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -0,0 +1,53 @@
1From 49bd068c3acf376a3018c0ebd849bf7f72a1874d Mon Sep 17 00:00:00 2001
2From: James Clarke <jrtc27@jrtc27.com>
3Date: Fri, 19 Jan 2018 17:22:49 +0000
4Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
5 gdb_wait.h
6
7On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
8contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
9define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
10earlier; include it from linux-ptrace.h so it can never come afterwards.
11
12gdb/ChangeLog:
13
14 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15 gdb_ptrace.h, and move including gdb_wait.h ...
16 * nat/linux-ptrace.h: ... to here.
17
18Upstream-Status: Accepted [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
19
20Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
21---
22 gdb/nat/linux-ptrace.c | 2 --
23 gdb/nat/linux-ptrace.h | 1 +
24 2 files changed, 1 insertion(+), 2 deletions(-)
25
26diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
27index 3447e07..dd3310e 100644
28--- a/gdb/nat/linux-ptrace.c
29+++ b/gdb/nat/linux-ptrace.c
30@@ -21,8 +21,6 @@
31 #include "linux-procfs.h"
32 #include "linux-waitpid.h"
33 #include "buffer.h"
34-#include "gdb_wait.h"
35-#include "gdb_ptrace.h"
36 #include <sys/procfs.h>
37
38 /* Stores the ptrace options supported by the running kernel.
39diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
40index 5954945..6faa89b 100644
41--- a/gdb/nat/linux-ptrace.h
42+++ b/gdb/nat/linux-ptrace.h
43@@ -21,6 +21,7 @@
44 struct buffer;
45
46 #include "nat/gdb_ptrace.h"
47+#include "gdb_wait.h"
48
49 #ifdef __UCLIBC__
50 #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
51--
522.7.4
53