Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 1 | From da30370c1e3ff7728a857e119e0529a9f097086e Mon Sep 17 00:00:00 2001 |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 3 | Date: Sat, 30 Apr 2016 18:32:14 -0700 |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 4 | Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 9 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 10 | --- |
| 11 | gdb/gdbserver/linux-ppc-low.c | 6 ++++++ |
| 12 | gdb/nat/ppc-linux.h | 6 ++++++ |
| 13 | 2 files changed, 12 insertions(+) |
| 14 | |
| 15 | diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 16 | index 1b695e53..1978347c 100644 |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | --- a/gdb/gdbserver/linux-ppc-low.c |
| 18 | +++ b/gdb/gdbserver/linux-ppc-low.c |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 19 | @@ -23,7 +23,13 @@ |
| 20 | #include "elf/common.h" |
| 21 | #include <sys/uio.h> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | #include "arch/ppc-linux-common.h" |
| 32 | #include "arch/ppc-linux-tdesc.h" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 33 | diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 34 | index f1561b3b..40399361 100644 |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 35 | --- a/gdb/nat/ppc-linux.h |
| 36 | +++ b/gdb/nat/ppc-linux.h |
| 37 | @@ -18,7 +18,13 @@ |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 38 | #ifndef NAT_PPC_LINUX_H |
| 39 | #define NAT_PPC_LINUX_H |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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. */ |