summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
blob: 7e09404bb0577a8a1eecccee528bea57d1502a2a (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
From e689eec672ee8c53b3adb2ade2b5deb9b7cd99d4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 18:32:14 -0700
Subject: [PATCH 3/9] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems

Upstream-Status: Pending

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

diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
index 1094f6b0be3..d8588a646c2 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,13 @@
 #ifndef NAT_PPC_LINUX_H
 #define NAT_PPC_LINUX_H
 
+#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.  */
diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
index 08824887003..69afbae5359 100644
--- a/gdbserver/linux-ppc-low.cc
+++ b/gdbserver/linux-ppc-low.cc
@@ -23,7 +23,13 @@
 #include "elf/common.h"
 #include <sys/uio.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 "arch/ppc-linux-common.h"
 #include "arch/ppc-linux-tdesc.h"
-- 
2.36.1