Include "ptrace.h" before any header that can include <signal.h>
because on some architectures the latter may include <asm/sigcontext.h>
which in turn may include <asm/ptrace.h> with potentially devastating
effect on <sys/ptrace.h>.
* process.c: Include "ptrace.h" before "regs.h".
* rt_sigframe.c: Likewise.
* sigreturn.c: Include "ptrace.h" before "nsig.h".
* syscall.c: Likewise.
* wait.c: Include "ptrace.h" before <sys/wait.h>.
* strace.c: Include "ptrace.h" before <signal.h>.
* tests/ptrace.c: Likewise.
* tests/test_ucopy.c: Include <sys/ptrace.h> before <signal.h>.
# include <elf.h>
#endif
-#include "xlat/nt_descriptor_types.h"
-
-#include "regs.h"
#include "ptrace.h"
+#include "regs.h"
+
+#include "xlat/nt_descriptor_types.h"
#include "xlat/ptrace_cmds.h"
#include "xlat/ptrace_setoptions_flags.h"
#include "xlat/ptrace_peeksiginfo_flags.h"
*/
#include "defs.h"
-#include "regs.h"
#include "ptrace.h"
+#include "regs.h"
#define DEF_FUNC_GET_RT_SIGFRAME_ADDR \
kernel_ulong_t get_rt_sigframe_addr(struct tcb *tcp)
#include "defs.h"
+#include "ptrace.h"
#include "nsig.h"
#include "regs.h"
-#include "ptrace.h"
#if defined HAVE_ASM_SIGCONTEXT_H && !defined HAVE_STRUCT_SIGCONTEXT
# include <asm/sigcontext.h>
#include <stdarg.h>
#include <limits.h>
#include <fcntl.h>
+#include "ptrace.h"
#include <signal.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include "largefile_wrappers.h"
#include "number_set.h"
#include "scno.h"
-#include "ptrace.h"
#include "printsiginfo.h"
#include "trace_event.h"
#include "xstring.h"
#include "defs.h"
#include "native_defs.h"
+#include "ptrace.h"
#include "nsig.h"
#include "number_set.h"
#include <limits.h>
#include <asm/unistd.h>
#include "regs.h"
-#include "ptrace.h"
#if defined(SPARC64)
# undef PTRACE_GETREGS
#include <asm/unistd.h>
#include <errno.h>
+#include "ptrace.h"
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
-#include "ptrace.h"
#include <linux/audit.h>
static const char *errstr;
#include "tests.h"
#include <errno.h>
+#include <sys/ptrace.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
-#include <sys/ptrace.h>
#include <sys/uio.h>
#include <sys/wait.h>
*/
#include "defs.h"
+#include "ptrace.h"
#include <sys/wait.h>
# define W_CONTINUED 0xffff
#endif
-#include "ptrace.h"
#include "xlat/ptrace_events.h"
static int