0007-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-gdb_wait-h.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8 Mon Sep 17 00:00:00 2001
  2. From: James Clarke <jrtc27@jrtc27.com>
  3. Date: Fri, 19 Jan 2018 17:22:49 +0000
  4. Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
  5. gdb_wait.h
  6. On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
  7. contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
  8. define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
  9. earlier; include it from linux-ptrace.h so it can never come afterwards.
  10. gdb/ChangeLog:
  11. * nat/linux-ptrace.c: Remove unnecessary reinclusion of
  12. gdb_ptrace.h, and move including gdb_wait.h ...
  13. * nat/linux-ptrace.h: ... to here.
  14. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  15. [Retrieved (and updated to remove ChangeLog update) from:
  16. https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
  17. ---
  18. gdb/ChangeLog | 6 ++++++
  19. gdb/nat/linux-ptrace.c | 2 --
  20. gdb/nat/linux-ptrace.h | 1 +
  21. 3 files changed, 7 insertions(+), 2 deletions(-)
  22. diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
  23. index 5c4ddc9..1f21ef0 100644
  24. --- a/gdb/nat/linux-ptrace.c
  25. +++ b/gdb/nat/linux-ptrace.c
  26. @@ -21,8 +21,6 @@
  27. #include "linux-procfs.h"
  28. #include "linux-waitpid.h"
  29. #include "buffer.h"
  30. -#include "gdb_wait.h"
  31. -#include "gdb_ptrace.h"
  32. #ifdef HAVE_SYS_PROCFS_H
  33. #include <sys/procfs.h>
  34. #endif
  35. diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
  36. index 60967a3..dc180fb 100644
  37. --- a/gdb/nat/linux-ptrace.h
  38. +++ b/gdb/nat/linux-ptrace.h
  39. @@ -21,6 +21,7 @@
  40. struct buffer;
  41. #include "nat/gdb_ptrace.h"
  42. +#include "gdb_wait.h"
  43. #ifdef __UCLIBC__
  44. #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
  45. --
  46. 2.9.3