1 // RUN: %clangxx_msan -m64 -O0 %s -o %t && %t
5 #include <sys/ptrace.h>
14 if (pid
== 0) { // child
15 ptrace(PTRACE_TRACEME
, 0, NULL
, NULL
);
16 execl("/bin/true", "true", NULL
);
19 user_regs_struct regs
;
21 res
= ptrace(PTRACE_GETREGS
, pid
, NULL
, ®s
);
24 printf("%zx\n", regs
.rip
);
26 user_fpregs_struct fpregs
;
27 res
= ptrace(PTRACE_GETFPREGS
, pid
, NULL
, &fpregs
);
30 printf("%x\n", fpregs
.mxcsr
);
32 ptrace(PTRACE_CONT
, pid
, NULL
, NULL
);