0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From 72ee19f54fd35595465b2e35eccf1f3d65fe21c6 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Sat, 6 Aug 2016 17:32:50 -0700
  4. Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
  5. Upstream-Status: Pending
  6. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  7. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  8. [Rebase on gdb 8.3]
  9. Signed-off-by: Romain Naour <romain.naour@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. diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
  15. index 1b695e53fe9..1978347c02c 100644
  16. --- a/gdb/gdbserver/linux-ppc-low.c
  17. +++ b/gdb/gdbserver/linux-ppc-low.c
  18. @@ -23,7 +23,13 @@
  19. #include "elf/common.h"
  20. #include <sys/uio.h>
  21. #include <elf.h>
  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 "arch/ppc-linux-common.h"
  30. #include "arch/ppc-linux-tdesc.h"
  31. diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
  32. index f1561b3b357..40399361c09 100644
  33. --- a/gdb/nat/ppc-linux.h
  34. +++ b/gdb/nat/ppc-linux.h
  35. @@ -18,7 +18,13 @@
  36. #ifndef NAT_PPC_LINUX_H
  37. #define NAT_PPC_LINUX_H
  38. +#if !defined(__GLIBC__)
  39. +# define pt_regs uapi_pt_regs
  40. +#endif
  41. #include <asm/ptrace.h>
  42. +#if !defined(__GLIBC__)
  43. +# undef pt_regs
  44. +#endif
  45. #include <asm/cputable.h>
  46. /* This sometimes isn't defined. */
  47. --
  48. 2.21.0