blob: cbe1779db7f9553bf69df7dd88bb17b455a28a39 [file] [log] [blame]
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001From afbb66c244b1ae0aaaa90d88d3cd484f741c614f Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Apr 2016 18:32:14 -0700
Andrew Geissler6ce62a22020-11-30 19:58:47 -06004Subject: [PATCH 03/11] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
5 systems
Andrew Geissler82c905d2020-04-13 13:39:40 -05006
7Upstream-Status: Pending
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
Andrew Geissler6ce62a22020-11-30 19:58:47 -060011 gdb/nat/ppc-linux.h | 6 ++++++
12 gdbserver/linux-ppc-low.cc | 6 ++++++
Andrew Geissler82c905d2020-04-13 13:39:40 -050013 2 files changed, 12 insertions(+)
14
Andrew Geissler82c905d2020-04-13 13:39:40 -050015diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
Andrew Geissler6ce62a22020-11-30 19:58:47 -060016index d937a65b69c..1fd54b4a0e0 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050017--- a/gdb/nat/ppc-linux.h
18+++ b/gdb/nat/ppc-linux.h
19@@ -18,7 +18,13 @@
20 #ifndef NAT_PPC_LINUX_H
21 #define NAT_PPC_LINUX_H
22
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 #include <asm/cputable.h>
31
32 /* This sometimes isn't defined. */
Andrew Geissler6ce62a22020-11-30 19:58:47 -060033diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
34index 337d555aee7..5d518f37268 100644
35--- a/gdbserver/linux-ppc-low.cc
36+++ b/gdbserver/linux-ppc-low.cc
37@@ -23,7 +23,13 @@
38 #include "elf/common.h"
39 #include <sys/uio.h>
40 #include <elf.h>
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
49 #include "arch/ppc-linux-common.h"
50 #include "arch/ppc-linux-tdesc.h"
51--
522.29.2
53