blob: bbe0020bf3a12d82bb9b6b69e6a903922890e3d9 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 1dd5c44474b01d84de60faded960fef4a0a87e41 Mon Sep 17 00:00:00 2001
Patrick Williamsc0f7c042017-02-23 20:41:17 -06002From: Khem Raj <raj.khem@gmail.com>
Brad Bishopd7bf8c12018-02-25 22:55:05 -05003Date: Sat, 30 Apr 2016 18:32:14 -0700
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08004Subject: [PATCH 04/11] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
Patrick Williamsc0f7c042017-02-23 20:41:17 -06005 systems
6
7Upstream-Status: Pending
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 gdb/gdbserver/linux-ppc-low.c | 6 ++++++
12 gdb/nat/ppc-linux.h | 6 ++++++
13 2 files changed, 12 insertions(+)
14
15diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080016index 47428c1529..841a5e02b9 100644
Patrick Williamsc0f7c042017-02-23 20:41:17 -060017--- a/gdb/gdbserver/linux-ppc-low.c
18+++ b/gdb/gdbserver/linux-ppc-low.c
19@@ -21,7 +21,13 @@
20 #include "linux-low.h"
21
22 #include <elf.h>
23+#if !defined(__GLIBC__)
24+# define pt_regs uapi_pt_regs
25+#endif
26 #include <asm/ptrace.h>
27+#if !defined(__GLIBC__)
28+# undef pt_regs
29+#endif
30
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031 #include "arch/ppc-linux-common.h"
32 #include "arch/ppc-linux-tdesc.h"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060033diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080034index 3d4d4fdc56..5b93af8d3a 100644
Patrick Williamsc0f7c042017-02-23 20:41:17 -060035--- a/gdb/nat/ppc-linux.h
36+++ b/gdb/nat/ppc-linux.h
37@@ -18,7 +18,13 @@
38 #ifndef PPC_LINUX_H
39 #define PPC_LINUX_H 1
40
41+#if !defined(__GLIBC__)
42+# define pt_regs uapi_pt_regs
43+#endif
44 #include <asm/ptrace.h>
45+#if !defined(__GLIBC__)
46+# undef pt_regs
47+#endif
48 #include <asm/cputable.h>
49
50 /* This sometimes isn't defined. */
51--
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800522.18.0
Patrick Williamsc0f7c042017-02-23 20:41:17 -060053