summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb/gdb/0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gdb/gdb/0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch')
-rw-r--r--meta/recipes-devtools/gdb/gdb/0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb/0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta/recipes-devtools/gdb/gdb/0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
new file mode 100644
index 0000000000..01e466f29b
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
@@ -0,0 +1,49 @@
1From e258cfb37d7c61b4a97e4ca8f1178485a3f91940 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Apr 2016 18:32:14 -0700
4Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
5
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 gdb/nat/ppc-linux.h | 6 ++++++
11 gdbserver/linux-ppc-low.cc | 6 ++++++
12 2 files changed, 12 insertions(+)
13
14diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
15index c84f9146bbd..8c8580c95e1 100644
16--- a/gdb/nat/ppc-linux.h
17+++ b/gdb/nat/ppc-linux.h
18@@ -18,7 +18,13 @@
19 #ifndef NAT_PPC_LINUX_H
20 #define NAT_PPC_LINUX_H
21
22+#if !defined(__GLIBC__)
23+# define pt_regs uapi_pt_regs
24+#endif
25 #include <asm/ptrace.h>
26+#if !defined(__GLIBC__)
27+# undef pt_regs
28+#endif
29 #include <asm/cputable.h>
30
31 /* This sometimes isn't defined. */
32diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
33index fdf74727e39..f64afd09b7a 100644
34--- a/gdbserver/linux-ppc-low.cc
35+++ b/gdbserver/linux-ppc-low.cc
36@@ -23,7 +23,13 @@
37 #include "elf/common.h"
38 #include <sys/uio.h>
39 #include <elf.h>
40+#if !defined(__GLIBC__)
41+# define pt_regs uapi_pt_regs
42+#endif
43 #include <asm/ptrace.h>
44+#if !defined(__GLIBC__)
45+# undef pt_regs
46+#endif
47
48 #include "arch/ppc-linux-common.h"
49 #include "arch/ppc-linux-tdesc.h"