aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
blob: 847f24f7fe48be49d74ebeb3152452ad0a5544b5 (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
From 7ef7b709885378279c424eab0510b93233400b24 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Aug 2016 17:32:50 -0700
Subject: [PATCH 04/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
 systems

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 gdb/gdbserver/linux-ppc-low.c | 6 ++++++
 gdb/nat/ppc-linux.h           | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
index 1d013f185f..68098b3db9 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -21,7 +21,13 @@
 #include "linux-low.h"
 
 #include <elf.h>
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+#endif
 #include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+#endif
 
 #include "nat/ppc-linux.h"
 #include "linux-ppc-tdesc.h"
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
index 85fbcd84bb..cbec9c53b2 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,13 @@
 #ifndef PPC_LINUX_H
 #define PPC_LINUX_H 1
 
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+#endif
 #include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+#endif
 #include <asm/cputable.h>
 
 /* This sometimes isn't defined.  */
-- 
2.11.0