summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
blob: ef97de777223dc830c0b68edac4ebd2cd57177a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From b033a9663053eed87cb572397176747b88e9a699 Mon Sep 17 00:00:00 2001
From: James Clarke <jrtc27@jrtc27.com>
Date: Fri, 19 Jan 2018 17:22:49 +0000
Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
 gdb_wait.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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.

Upstream-Status: Accepted [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
---
 gdb/nat/linux-ptrace.c | 2 --
 gdb/nat/linux-ptrace.h | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
index 3265b16..559c2de 100644
--- a/gdb/nat/linux-ptrace.c
+++ b/gdb/nat/linux-ptrace.c
@@ -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
diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
index 5954945..6faa89b 100644
--- a/gdb/nat/linux-ptrace.h
+++ b/gdb/nat/linux-ptrace.h
@@ -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__))
-- 
2.7.4