0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From e258cfb37d7c61b4a97e4ca8f1178485a3f91940 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Sat, 30 Apr 2016 18:32:14 -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. ---
  8. gdb/nat/ppc-linux.h | 6 ++++++
  9. gdbserver/linux-ppc-low.cc | 6 ++++++
  10. 2 files changed, 12 insertions(+)
  11. diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
  12. index c84f9146bbd..8c8580c95e1 100644
  13. --- a/gdb/nat/ppc-linux.h
  14. +++ b/gdb/nat/ppc-linux.h
  15. @@ -18,7 +18,13 @@
  16. #ifndef NAT_PPC_LINUX_H
  17. #define NAT_PPC_LINUX_H
  18. +#if !defined(__GLIBC__)
  19. +# define pt_regs uapi_pt_regs
  20. +#endif
  21. #include <asm/ptrace.h>
  22. +#if !defined(__GLIBC__)
  23. +# undef pt_regs
  24. +#endif
  25. #include <asm/cputable.h>
  26. /* This sometimes isn't defined. */
  27. diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
  28. index fdf74727e39..f64afd09b7a 100644
  29. --- a/gdbserver/linux-ppc-low.cc
  30. +++ b/gdbserver/linux-ppc-low.cc
  31. @@ -23,7 +23,13 @@
  32. #include "elf/common.h"
  33. #include <sys/uio.h>
  34. #include <elf.h>
  35. +#if !defined(__GLIBC__)
  36. +# define pt_regs uapi_pt_regs
  37. +#endif
  38. #include <asm/ptrace.h>
  39. +#if !defined(__GLIBC__)
  40. +# undef pt_regs
  41. +#endif
  42. #include "arch/ppc-linux-common.h"
  43. #include "arch/ppc-linux-tdesc.h"