Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 1 | From e689eec672ee8c53b3adb2ade2b5deb9b7cd99d4 Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 30 Apr 2016 18:32:14 -0700 |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 4 | Subject: [PATCH 3/9] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | --- |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 10 | gdb/nat/ppc-linux.h | 6 ++++++ |
| 11 | gdbserver/linux-ppc-low.cc | 6 ++++++ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 12 | 2 files changed, 12 insertions(+) |
| 13 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 15 | index 1094f6b0be3..d8588a646c2 100644 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 16 | --- a/gdb/nat/ppc-linux.h |
| 17 | +++ b/gdb/nat/ppc-linux.h |
| 18 | @@ -18,7 +18,13 @@ |
| 19 | #ifndef NAT_PPC_LINUX_H |
| 20 | #define NAT_PPC_LINUX_H |
| 21 | |
| 22 | +#if !defined(__GLIBC__) |
| 23 | +# define pt_regs uapi_pt_regs |
| 24 | +#endif |
| 25 | #include <asm/ptrace.h> |
| 26 | +#if !defined(__GLIBC__) |
| 27 | +# undef pt_regs |
| 28 | +#endif |
| 29 | #include <asm/cputable.h> |
| 30 | |
| 31 | /* This sometimes isn't defined. */ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 32 | diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 33 | index 08824887003..69afbae5359 100644 |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 34 | --- a/gdbserver/linux-ppc-low.cc |
| 35 | +++ b/gdbserver/linux-ppc-low.cc |
| 36 | @@ -23,7 +23,13 @@ |
| 37 | #include "elf/common.h" |
| 38 | #include <sys/uio.h> |
| 39 | #include <elf.h> |
| 40 | +#if !defined(__GLIBC__) |
| 41 | +# define pt_regs uapi_pt_regs |
| 42 | +#endif |
| 43 | #include <asm/ptrace.h> |
| 44 | +#if !defined(__GLIBC__) |
| 45 | +# undef pt_regs |
| 46 | +#endif |
| 47 | |
| 48 | #include "arch/ppc-linux-common.h" |
| 49 | #include "arch/ppc-linux-tdesc.h" |
| 50 | -- |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 51 | 2.36.1 |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 52 | |