0007-Use-exorted-definitions-of-SIGRTMIN.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 53f694ffa1ee9893b834758413c23947957f0fee Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Sat, 30 Apr 2016 15:31:40 -0700
  4. Subject: [PATCH 07/11] Use exorted definitions of SIGRTMIN
  5. Define W_STOPCODE if not defined already
  6. __SIGRTMIN is internal to glibc and other libcs e.g. musl
  7. may not provide them
  8. Fixes
  9. https://sourceware.org/bugzilla/show_bug.cgi?id=13012
  10. Upstream-Status: Submitted
  11. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  12. ---
  13. gdb/linux-nat.c | 4 ++--
  14. gdb/nat/linux-nat.h | 4 ++++
  15. 2 files changed, 6 insertions(+), 2 deletions(-)
  16. diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
  17. index b81014024c7..e0513d47122 100644
  18. --- a/gdb/linux-nat.c
  19. +++ b/gdb/linux-nat.c
  20. @@ -4428,6 +4428,6 @@ lin_thread_get_thread_signals (sigset_t *set)
  21. /* NPTL reserves the first two RT signals, but does not provide any
  22. way for the debugger to query the signal numbers - fortunately
  23. they don't change. */
  24. - sigaddset (set, __SIGRTMIN);
  25. - sigaddset (set, __SIGRTMIN + 1);
  26. + sigaddset (set, SIGRTMIN);
  27. + sigaddset (set, SIGRTMIN + 1);
  28. }
  29. diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
  30. index 44dcbb7758d..975d7276f66 100644
  31. --- a/gdb/nat/linux-nat.h
  32. +++ b/gdb/nat/linux-nat.h
  33. @@ -91,4 +91,8 @@ extern void linux_stop_lwp (struct lwp_info *lwp);
  34. extern int lwp_is_stepping (struct lwp_info *lwp);
  35. +#ifndef W_STOPCODE
  36. +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
  37. +#endif
  38. +
  39. #endif /* NAT_LINUX_NAT_H */
  40. --
  41. 2.29.2