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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From afbb66c244b1ae0aaaa90d88d3cd484f741c614f 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 03/11] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
  5. systems
  6. Upstream-Status: Pending
  7. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  8. ---
  9. gdb/nat/ppc-linux.h | 6 ++++++
  10. gdbserver/linux-ppc-low.cc | 6 ++++++
  11. 2 files changed, 12 insertions(+)
  12. diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
  13. index d937a65b69c..1fd54b4a0e0 100644
  14. --- a/gdb/nat/ppc-linux.h
  15. +++ b/gdb/nat/ppc-linux.h
  16. @@ -18,7 +18,13 @@
  17. #ifndef NAT_PPC_LINUX_H
  18. #define NAT_PPC_LINUX_H
  19. +#if !defined(__GLIBC__)
  20. +# define pt_regs uapi_pt_regs
  21. +#endif
  22. #include <asm/ptrace.h>
  23. +#if !defined(__GLIBC__)
  24. +# undef pt_regs
  25. +#endif
  26. #include <asm/cputable.h>
  27. /* This sometimes isn't defined. */
  28. diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
  29. index 337d555aee7..5d518f37268 100644
  30. --- a/gdbserver/linux-ppc-low.cc
  31. +++ b/gdbserver/linux-ppc-low.cc
  32. @@ -23,7 +23,13 @@
  33. #include "elf/common.h"
  34. #include <sys/uio.h>
  35. #include <elf.h>
  36. +#if !defined(__GLIBC__)
  37. +# define pt_regs uapi_pt_regs
  38. +#endif
  39. #include <asm/ptrace.h>
  40. +#if !defined(__GLIBC__)
  41. +# undef pt_regs
  42. +#endif
  43. #include "arch/ppc-linux-common.h"
  44. #include "arch/ppc-linux-tdesc.h"
  45. --
  46. 2.29.2