Mpersify parsers of struct stat and struct stat64

On many architectures that support multiple personalities,
struct stat differ between personalities.  While old code could handle
these differences, there are some architectures, e.g. sparc64, that also
have different struct stat64.  Rewrite parsers using mpers functionality
to fix these issues.

* fetch_struct_stat.c: New file.
* fetch_struct_stat64.c: Likewise.
* print_struct_stat.c: Likewise.
* oldstat.c: Likewise.
* stat.c: Likewise.
* stat.h: Likewise.
* stat64.c: Likewise.
* file.c: Remove.
* printstat.h: Likewise.
* linux/aarch64/stat32.h: Likewise.
* linux/powerpc64/stat32.h: Likewise.
* linux/riscv/stat32.h: Likewise.
* linux/sparc64/stat32.h: Likewise.
* linux/tile/stat32.h: Likewise.
* linux/x32/stat32.h: Likewise.
* linux/x86_64/stat32.h: Likewise.
* Makefile.am (strace_SOURCES): Add fetch_struct_stat.c,
fetch_struct_stat64.c, print_struct_stat.c, oldstat.c, stat.c, stat.h,
and stat64.c.  Remove file.c, printstat.h, linux/aarch64/stat32.h,
linux/powerpc64/stat32.h, linux/riscv/stat32.h, linux/sparc64/stat32.h,
linux/tile/stat32.h, linux/x32/stat32.h, and linux/x86_64/stat32.h.
* configure.ac (AC_CHECK_MEMBERS): Add struct stat64.st_mtime_nsec.
* defs.h (struct strace_stat): New declaration.
(print_struct_stat): New prototype.
* linux/dummy.h (sys_fstatat64): Remove.
20 files changed
tree: b2a6a723a4949d284ba4e09e0e306e80d803f20d
  1. debian/
  2. linux/
  3. m4/
  4. maint/
  5. qemu_multiarch_testing/
  6. test/
  7. tests/
  8. xlat/
  9. .gitignore
  10. .mailmap
  11. .travis.yml
  12. access.c
  13. affinity.c
  14. aio.c
  15. alpha.c
  16. AUTHORS
  17. bjm.c
  18. block.c
  19. bootstrap
  20. bpf.c
  21. btrfs.c
  22. build_static_example.sh
  23. cacheflush.c
  24. capability.c
  25. caps0.h
  26. caps1.h
  27. ChangeLog-CVS
  28. chdir.c
  29. chmod.c
  30. clone.c
  31. configure.ac
  32. copy_file_range.c
  33. COPYING
  34. count.c
  35. CREDITS.in
  36. defs.h
  37. desc.c
  38. dirent.c
  39. dirent64.c
  40. empty.h
  41. epoll.c
  42. errnoent.sh
  43. evdev.c
  44. eventfd.c
  45. execve.c
  46. exit.c
  47. fadvise.c
  48. fallocate.c
  49. fanotify.c
  50. fchownat.c
  51. fcntl.c
  52. fetch_seccomp_fprog.c
  53. fetch_struct_flock.c
  54. fetch_struct_mmsghdr.c
  55. fetch_struct_msghdr.c
  56. fetch_struct_stat.c
  57. fetch_struct_stat64.c
  58. fetch_struct_statfs.c
  59. file_handle.c
  60. file_ioctl.c
  61. flock.c
  62. flock.h
  63. fs_x_ioctl.c
  64. fstatfs.c
  65. fstatfs64.c
  66. futex.c
  67. gcc_compat.h
  68. generate_mpers_am.sh
  69. generate_sen.sh
  70. get_robust_list.c
  71. getcpu.c
  72. getcwd.c
  73. getrandom.c
  74. git-set-file-times
  75. git-version-gen
  76. gitlog-to-changelog
  77. HACKING-scripts
  78. hdio.c
  79. hostname.c
  80. inotify.c
  81. INSTALL
  82. io.c
  83. ioctl.c
  84. ioctlsort.c
  85. ioperm.c
  86. iopl.c
  87. ioprio.c
  88. ipc.c
  89. ipc_defs.h
  90. ipc_msg.c
  91. ipc_msgctl.c
  92. ipc_sem.c
  93. ipc_shm.c
  94. ipc_shmctl.c
  95. kcmp.c
  96. kernel_types.h
  97. kexec.c
  98. keyctl.c
  99. ldt.c
  100. link.c
  101. lookup_dcookie.c
  102. loop.c
  103. lseek.c
  104. make-dist
  105. make-dsc
  106. Makefile.am
  107. mem.c
  108. membarrier.c
  109. memfd_create.c
  110. mknod.c
  111. mmsghdr.c
  112. mount.c
  113. mpers.awk
  114. mpers.sh
  115. mpers_test.sh
  116. mpers_type.h
  117. mq.c
  118. msghdr.c
  119. msghdr.h
  120. mtd.c
  121. native_defs.h
  122. net.c
  123. netlink.c
  124. NEWS
  125. numa.c
  126. oldstat.c
  127. open.c
  128. or1k_atomic.c
  129. pathtrace.c
  130. perf.c
  131. personality.c
  132. poll.c
  133. prctl.c
  134. print_mq_attr.c
  135. print_msgbuf.c
  136. print_sigevent.c
  137. print_statfs.c
  138. print_struct_stat.c
  139. print_time.c
  140. print_timex.c
  141. printmode.c
  142. printrusage.c
  143. printsiginfo.c
  144. printsiginfo.h
  145. process.c
  146. process_vm.c
  147. ptp.c
  148. ptrace.h
  149. quota.c
  150. readahead.c
  151. readlink.c
  152. README
  153. README-hacking
  154. README-linux-ptrace
  155. README-mpers
  156. README.md
  157. reboot.c
  158. regs.h
  159. renameat.c
  160. resource.c
  161. rtc.c
  162. sched.c
  163. scsi.c
  164. seccomp.c
  165. seccomp_fprog.h
  166. sendfile.c
  167. sigaltstack.c
  168. sigevent.h
  169. signal.c
  170. signalent.sh
  171. signalfd.c
  172. sigreturn.c
  173. sock.c
  174. sockaddr.c
  175. socketcall.c
  176. socketutils.c
  177. sram_alloc.c
  178. stat.c
  179. stat.h
  180. stat64.c
  181. statfs.c
  182. statfs.h
  183. statfs64.c
  184. strace-graph
  185. strace-log-merge
  186. strace.1
  187. strace.c
  188. strace.spec.in
  189. swapon.c
  190. sync_file_range.c
  191. sync_file_range2.c
  192. syscall.c
  193. syscallent.sh
  194. sysctl.c
  195. sysinfo.c
  196. syslog.c
  197. sysmips.c
  198. term.c
  199. time.c
  200. times.c
  201. travis-build.sh
  202. travis-install.sh
  203. travis-success.sh
  204. truncate.c
  205. ubi.c
  206. uid.c
  207. uid16.c
  208. umask.c
  209. umount.c
  210. uname.c
  211. unwind.c
  212. upeek.c
  213. userfaultfd.c
  214. util.c
  215. utime.c
  216. utimes.c
  217. v4l2.c
  218. vsprintf.c
  219. wait.c
  220. xattr.c
  221. xlat.h
  222. xlate.el
  223. xmalloc.c
README.md

This is strace -- a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace.

strace is released under a Berkeley-style license at the request of Paul Kranenburg; see the file COPYING for details.

See the file NEWS for information on what has changed in recent versions.

Please send bug reports and enhancements to the strace mailing list.

Build Status Code Coverage