0002-Define-PTRACE_GETSIGINFO-on-PowerPC-when-not-availab.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 7311686d6286972ff97cc18b2416a4cdd7fc5c7e Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Sat, 31 Oct 2015 12:15:24 +0100
  4. Subject: [PATCH] Define PTRACE_GETSIGINFO on PowerPC when not available
  5. uClibc 0.9.33.2 does not define PTRACE_GETSIGINFO in PowerPC. Even
  6. though Buildroot has a uClibc patch doing that, it doesn't solve the
  7. case of external uClibc toolchain from other sources (such as
  8. Crosstool-NG). Therefore, this patch modifies Valgrind to define
  9. PTRACE_GETSIGINFO on PowerPC to the right value, when such definition
  10. is not available from the C library.
  11. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  12. ---
  13. coregrind/vgdb-invoker-ptrace.c | 6 ++++++
  14. 1 file changed, 6 insertions(+)
  15. diff --git a/coregrind/vgdb-invoker-ptrace.c b/coregrind/vgdb-invoker-ptrace.c
  16. index d65f59a..bdefac2 100644
  17. --- a/coregrind/vgdb-invoker-ptrace.c
  18. +++ b/coregrind/vgdb-invoker-ptrace.c
  19. @@ -72,6 +72,12 @@
  20. # endif
  21. #endif
  22. +#if defined(__powerpc__)
  23. +# ifndef PTRACE_GETSIGINFO
  24. +# define PTRACE_GETSIGINFO 0x4202
  25. +# endif
  26. +#endif
  27. +
  28. // 32-bit or 64-bit wide, depending on primary architecture.
  29. typedef Addr CORE_ADDR;
  30. typedef Addr PTRACE_XFER_TYPE;
  31. --
  32. 2.1.4