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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From 7dd846212d46b5d0930c938222181cd305254951 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.0]
  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 47428c1529c..841a5e02b9d 100644
  16. --- a/gdb/gdbserver/linux-ppc-low.c
  17. +++ b/gdb/gdbserver/linux-ppc-low.c
  18. @@ -21,7 +21,13 @@
  19. #include "linux-low.h"
  20. #include <elf.h>
  21. +#if !defined(__GLIBC__)
  22. +# define pt_regs uapi_pt_regs
  23. +#endif
  24. #include <asm/ptrace.h>
  25. +#if !defined(__GLIBC__)
  26. +# undef pt_regs
  27. +#endif
  28. #include "arch/ppc-linux-common.h"
  29. #include "arch/ppc-linux-tdesc.h"
  30. diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
  31. index 3d4d4fdc563..5b93af8d3a3 100644
  32. --- a/gdb/nat/ppc-linux.h
  33. +++ b/gdb/nat/ppc-linux.h
  34. @@ -18,7 +18,13 @@
  35. #ifndef PPC_LINUX_H
  36. #define PPC_LINUX_H 1
  37. +#if !defined(__GLIBC__)
  38. +# define pt_regs uapi_pt_regs
  39. +#endif
  40. #include <asm/ptrace.h>
  41. +#if !defined(__GLIBC__)
  42. +# undef pt_regs
  43. +#endif
  44. #include <asm/cputable.h>
  45. /* This sometimes isn't defined. */
  46. --
  47. 2.14.4