Mpersify fetchers of struct msghdr and struct mmsghdr

* fetch_struct_msghdr.c: New file.
* fetch_struct_mmsghdr.c: Likewise.
* Makefile.am (strace_SOURCES): Add them.
* net.c (struct msghdr32, struct mmsghdr32, copy_from_msghdr32,
fetch_msghdr, fetch_mmsghdr): Remove.
(decode_msghdr, dumpiov_in_msghdr): Use fetch_struct_msghdr instead
of fetch_msghdr.
(decode_mmsghdr): Change msg_len argument to use_msg_len.
Use fetch_struct_mmsghdr instead of fetch_mmsghdr.
Return fetch_struct_mmsghdr's return code.
(decode_mmsg): Rename to decode_mmsgvec.  Take addr and len arguments.
Do not print vlen and flags.  Check decode_mmsghdr's return code.
Print mmsghdr array using square brackets.
(dumpiov_in_mmsghdr): Use fetch_struct_mmsghdr instead of fetch_mmsghdr.
(SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg)): Use decode_mmsgvec instead
of decode_mmsg.  Print vlen and flags.
* tests/mmsg.c (main): Update expected output.
5 files changed
tree: 53debfee05ef240f38d680bb66690b0e7932c0d7
  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_statfs.c
  57. file.c
  58. file_handle.c
  59. file_ioctl.c
  60. flock.c
  61. flock.h
  62. fs_x_ioctl.c
  63. fstatfs.c
  64. fstatfs64.c
  65. futex.c
  66. gcc_compat.h
  67. generate_mpers_am.sh
  68. generate_sen.sh
  69. generate_xlat_in.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_defs.h
  89. ipc_msg.c
  90. ipc_msgctl.c
  91. ipc_sem.c
  92. ipc_shm.c
  93. ipc_shmctl.c
  94. kcmp.c
  95. kernel_types.h
  96. kexec.c
  97. keyctl.c
  98. ldt.c
  99. link.c
  100. lookup_dcookie.c
  101. loop.c
  102. lseek.c
  103. make-dist
  104. make-dsc
  105. Makefile.am
  106. mem.c
  107. membarrier.c
  108. memfd_create.c
  109. mknod.c
  110. mount.c
  111. mpers.awk
  112. mpers.sh
  113. mpers_test.sh
  114. mpers_type.h
  115. mq.c
  116. msghdr.h
  117. mtd.c
  118. native_defs.h
  119. net.c
  120. NEWS
  121. numa.c
  122. open.c
  123. or1k_atomic.c
  124. pathtrace.c
  125. perf.c
  126. personality.c
  127. poll.c
  128. prctl.c
  129. print_mq_attr.c
  130. print_msgbuf.c
  131. print_sigevent.c
  132. print_statfs.c
  133. print_time.c
  134. print_timex.c
  135. printmode.c
  136. printrusage.c
  137. printsiginfo.c
  138. printsiginfo.h
  139. printstat.h
  140. process.c
  141. process_vm.c
  142. ptp.c
  143. ptrace.h
  144. quota.c
  145. readahead.c
  146. readlink.c
  147. README
  148. README-hacking
  149. README-linux-ptrace
  150. README-mpers
  151. README.md
  152. reboot.c
  153. regs.h
  154. renameat.c
  155. resource.c
  156. rtc.c
  157. sched.c
  158. scsi.c
  159. seccomp.c
  160. seccomp_fprog.h
  161. sendfile.c
  162. sigaltstack.c
  163. sigevent.h
  164. signal.c
  165. signalent.sh
  166. signalfd.c
  167. sigreturn.c
  168. sock.c
  169. sockaddr.c
  170. socketutils.c
  171. sram_alloc.c
  172. statfs.c
  173. statfs.h
  174. statfs64.c
  175. strace-graph
  176. strace-log-merge
  177. strace.1
  178. strace.c
  179. strace.spec.in
  180. swapon.c
  181. sync_file_range.c
  182. sync_file_range2.c
  183. syscall.c
  184. syscallent.sh
  185. sysctl.c
  186. sysinfo.c
  187. syslog.c
  188. sysmips.c
  189. term.c
  190. time.c
  191. times.c
  192. travis-build.sh
  193. travis-install.sh
  194. travis-success.sh
  195. truncate.c
  196. ubi.c
  197. uid.c
  198. uid16.c
  199. umask.c
  200. umount.c
  201. uname.c
  202. unwind.c
  203. upeek.c
  204. userfaultfd.c
  205. util.c
  206. utime.c
  207. utimes.c
  208. v4l2.c
  209. vsprintf.c
  210. wait.c
  211. xattr.c
  212. xlat.h
  213. xlate.el
  214. 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