diff options
| author | Michael Forney <mforney@mforney.org> | 2017-02-25 14:32:30 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2017-02-25 14:50:33 -0800 |
| commit | d785e9083077a7620a7cb9c2efada4dab7112bc0 (patch) | |
| tree | dc11e417341ad637ba2d03cdd29f4d951445cdb6 | |
| parent | 2ffb8bfc373bca335f99debebeafe8cf48381063 (diff) | |
Add strace 4.16
| -rw-r--r-- | pkg/gen.rc | 1 | ||||
| -rw-r--r-- | pkg/strace/.gitignore | 3 | ||||
| -rw-r--r-- | pkg/strace/config.h | 365 | ||||
| -rw-r--r-- | pkg/strace/gen.rc | 246 | ||||
| -rw-r--r-- | pkg/strace/mpers.txt | 36 | ||||
| -rw-r--r-- | pkg/strace/printerdecls.awk | 11 | ||||
| -rw-r--r-- | pkg/strace/printerdefs.awk | 8 | ||||
| -rw-r--r-- | pkg/strace/printers.awk | 19 | ||||
| -rw-r--r-- | pkg/strace/rev | 1 | ||||
| -rw-r--r-- | pkg/strace/sen.awk | 16 | ||||
| -rw-r--r-- | pkg/strace/sha256 | 1 | ||||
| -rw-r--r-- | pkg/strace/url | 1 | ||||
| -rw-r--r-- | sets.rc | 1 |
13 files changed, 709 insertions, 0 deletions
@@ -68,6 +68,7 @@ subgen sinit subgen skeleton subgen sshfs subgen st +subgen strace subgen swc subgen terminus-font subgen the_silver_searcher diff --git a/pkg/strace/.gitignore b/pkg/strace/.gitignore new file mode 100644 index 00000000..1b8cf02d --- /dev/null +++ b/pkg/strace/.gitignore @@ -0,0 +1,3 @@ +/src +/strace-4.16.tar.xz +/tools.ninja diff --git a/pkg/strace/config.h b/pkg/strace/config.h new file mode 100644 index 00000000..9509f8f6 --- /dev/null +++ b/pkg/strace/config.h @@ -0,0 +1,365 @@ +#include <config-posix.h> + +/* #undef AARCH64 */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ +/* #undef ALPHA */ +/* #undef ARC */ +/* #undef ARM */ +#define ASM_SA_RESTORER 0x04000000 +#define ASM_SIGRTMIN 32 +/* #undef AVR32 */ +/* #undef BFIN */ +/* #undef CRISV10 */ +/* #undef CRISV32 */ +#define ENABLE_ARM_OABI 0 +#define HAVE_ACCEPT4 1 +/* #undef HAVE_ASM_CACHECTL_H */ +/* #undef HAVE_ASM_SIGCONTEXT_H */ +/* #undef HAVE_ASM_SYSMIPS_H */ +#define HAVE_BLKGETSIZE64 1 +/* #undef HAVE_BLUETOOTH_BLUETOOTH_H */ +#define HAVE_DECL_BTRFS_COMPRESS_LZO 0 +#define HAVE_DECL_BTRFS_COMPRESS_NONE 0 +#define HAVE_DECL_BTRFS_COMPRESS_ZLIB 0 +#define HAVE_DECL_CTL_ARLAN 1 +#define HAVE_DECL_CTL_FRV 1 +#define HAVE_DECL_CTL_PM 1 +#define HAVE_DECL_CTL_PROC 1 +#define HAVE_DECL_CTL_S390DBF 1 +#define HAVE_DECL_CTL_SUNRPC 1 +#define HAVE_DECL_KERN_ACPI_VIDEO_FLAGS 1 +#define HAVE_DECL_KERN_BOOTLOADER_TYPE 1 +#define HAVE_DECL_KERN_COMPAT_LOG 1 +#define HAVE_DECL_KERN_HZ_TIMER 1 +#define HAVE_DECL_KERN_IA64_UNALIGNED 1 +#define HAVE_DECL_KERN_MAX_LOCK_DEPTH 1 +#define HAVE_DECL_KERN_NGROUPS_MAX 1 +#define HAVE_DECL_KERN_NMI_WATCHDOG 1 +#define HAVE_DECL_KERN_PANIC_ON_NMI 1 +#define HAVE_DECL_KERN_PRINTK_RATELIMIT 1 +#define HAVE_DECL_KERN_PRINTK_RATELIMIT_BURST 1 +#define HAVE_DECL_KERN_PTY 1 +#define HAVE_DECL_KERN_RANDOMIZE 1 +#define HAVE_DECL_KERN_SETUID_DUMPABLE 1 +#define HAVE_DECL_KERN_SPARC_SCONS_PWROFF 1 +#define HAVE_DECL_KERN_SPIN_RETRY 1 +#define HAVE_DECL_KERN_UNKNOWN_NMI_PANIC 1 +#define HAVE_DECL_LO_FLAGS_AUTOCLEAR 1 +#define HAVE_DECL_LO_FLAGS_DIRECT_IO 1 +#define HAVE_DECL_LO_FLAGS_PARTSCAN 1 +#define HAVE_DECL_LO_FLAGS_READ_ONLY 1 +#define HAVE_DECL_LO_FLAGS_USE_AOPS 0 +#define HAVE_DECL_NET_CIPSOV4_CACHE_BUCKET_SIZE 1 +#define HAVE_DECL_NET_CIPSOV4_CACHE_ENABLE 1 +#define HAVE_DECL_NET_CIPSOV4_RBM_OPTFMT 1 +#define HAVE_DECL_NET_CIPSOV4_RBM_STRICTVALID 1 +#define HAVE_DECL_NET_CORE_AEVENT_ETIME 1 +#define HAVE_DECL_NET_CORE_AEVENT_RSEQTH 1 +#define HAVE_DECL_NET_CORE_BUDGET 1 +#define HAVE_DECL_NET_CORE_DESTROY_DELAY 0 +#define HAVE_DECL_NET_CORE_WARNINGS 1 +#define HAVE_DECL_NET_DCCP 1 +#define HAVE_DECL_NET_IPV4_CONF_ARP_ACCEPT 1 +#define HAVE_DECL_NET_IPV4_CONF_ARP_ANNOUNCE 1 +#define HAVE_DECL_NET_IPV4_CONF_ARP_IGNORE 1 +#define HAVE_DECL_NET_IPV4_CONF_ARP_NOTIFY 1 +#define HAVE_DECL_NET_IPV4_CONF_FORCE_IGMP_VERSION 1 +#define HAVE_DECL_NET_IPV4_CONF_PROMOTE_SECONDARIES 1 +#define HAVE_DECL_NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR 1 +#define HAVE_DECL_NET_IPV4_IGMP_MAX_MSF 1 +#define HAVE_DECL_NET_IPV4_IPFRAG_MAX_DIST 1 +#define HAVE_DECL_NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS 1 +#define HAVE_DECL_NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS 1 +#define HAVE_DECL_NET_IPV6_MLD_MAX_MSF 1 +#define HAVE_DECL_NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS 1 +#define HAVE_DECL_NET_IRDA 1 +#define HAVE_DECL_NET_LLC 1 +#define HAVE_DECL_NET_NETFILTER 1 +#define HAVE_DECL_NET_TCP_ABC 1 +#define HAVE_DECL_NET_TCP_ALLOWED_CONG_CONTROL 1 +#define HAVE_DECL_NET_TCP_AVAIL_CONG_CONTROL 1 +#define HAVE_DECL_NET_TCP_BASE_MSS 1 +#define HAVE_DECL_NET_TCP_BIC_BETA 1 +#define HAVE_DECL_NET_TCP_CONG_CONTROL 1 +#define HAVE_DECL_NET_TCP_DEFAULT_WIN_SCALE 1 +#define HAVE_DECL_NET_TCP_DMA_COPYBREAK 1 +#define HAVE_DECL_NET_TCP_FRTO_RESPONSE 1 +#define HAVE_DECL_NET_TCP_MAX_SSTHRESH 1 +#define HAVE_DECL_NET_TCP_MODERATE_RCVBUF 1 +#define HAVE_DECL_NET_TCP_MTU_PROBING 1 +#define HAVE_DECL_NET_TCP_NO_METRICS_SAVE 1 +#define HAVE_DECL_NET_TCP_SLOW_START_AFTER_IDLE 1 +#define HAVE_DECL_NET_TCP_TSO_WIN_DIVISOR 1 +#define HAVE_DECL_PTRACE_PEEKUSER 1 +#define HAVE_DECL_PTRACE_POKEUSER 1 +#define HAVE_DECL_P_ALL 1 +#define HAVE_DECL_P_CID 0 +#define HAVE_DECL_P_GID 0 +#define HAVE_DECL_P_LWPID 0 +#define HAVE_DECL_P_PGID 1 +#define HAVE_DECL_P_PID 1 +#define HAVE_DECL_P_PPID 0 +#define HAVE_DECL_P_SID 0 +#define HAVE_DECL_P_UID 0 +#define HAVE_DECL_SYS_ERRLIST 0 +#define HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE 1 +#define HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT 1 +#define HAVE_DECL_V4L2_BUF_TYPE_VBI_CAPTURE 1 +#define HAVE_DECL_V4L2_BUF_TYPE_VBI_OUTPUT 1 +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE 1 +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 1 +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT 1 +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE 1 +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY 1 +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OVERLAY 1 +#define HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_BG 1 +#define HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_M 1 +#define HAVE_DECL_V4L2_COLORSPACE_BT878 1 +#define HAVE_DECL_V4L2_COLORSPACE_JPEG 1 +#define HAVE_DECL_V4L2_COLORSPACE_REC709 1 +#define HAVE_DECL_V4L2_COLORSPACE_SMPTE170M 1 +#define HAVE_DECL_V4L2_COLORSPACE_SMPTE240M 1 +#define HAVE_DECL_V4L2_COLORSPACE_SRGB 1 +#define HAVE_DECL_V4L2_CTRL_TYPE_BITMASK 1 +#define HAVE_DECL_V4L2_CTRL_TYPE_BOOLEAN 1 +#define HAVE_DECL_V4L2_CTRL_TYPE_BUTTON 1 +#define HAVE_DECL_V4L2_CTRL_TYPE_CTRL_CLASS 1 +#define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER 1 +#define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER64 1 +#define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER_MENU 1 +#define HAVE_DECL_V4L2_CTRL_TYPE_MENU 1 +#define HAVE_DECL_V4L2_CTRL_TYPE_STRING 1 +#define HAVE_DECL_V4L2_FIELD_ALTERNATE 1 +#define HAVE_DECL_V4L2_FIELD_ANY 1 +#define HAVE_DECL_V4L2_FIELD_BOTTOM 1 +#define HAVE_DECL_V4L2_FIELD_INTERLACED 1 +#define HAVE_DECL_V4L2_FIELD_INTERLACED_BT 1 +#define HAVE_DECL_V4L2_FIELD_INTERLACED_TB 1 +#define HAVE_DECL_V4L2_FIELD_NONE 1 +#define HAVE_DECL_V4L2_FIELD_SEQ_BT 1 +#define HAVE_DECL_V4L2_FIELD_SEQ_TB 1 +#define HAVE_DECL_V4L2_FIELD_TOP 1 +#define HAVE_DECL_V4L2_FRMIVAL_TYPE_CONTINUOUS 1 +#define HAVE_DECL_V4L2_FRMIVAL_TYPE_DISCRETE 1 +#define HAVE_DECL_V4L2_FRMIVAL_TYPE_STEPWISE 1 +#define HAVE_DECL_V4L2_FRMSIZE_TYPE_CONTINUOUS 1 +#define HAVE_DECL_V4L2_FRMSIZE_TYPE_DISCRETE 1 +#define HAVE_DECL_V4L2_FRMSIZE_TYPE_STEPWISE 1 +#define HAVE_DECL_V4L2_MEMORY_DMABUF 1 +#define HAVE_DECL_V4L2_MEMORY_MMAP 1 +#define HAVE_DECL_V4L2_MEMORY_OVERLAY 1 +#define HAVE_DECL_V4L2_MEMORY_USERPTR 1 +#define HAVE_DECL_V4L2_PRIORITY_BACKGROUND 1 +#define HAVE_DECL_V4L2_PRIORITY_INTERACTIVE 1 +#define HAVE_DECL_V4L2_PRIORITY_RECORD 1 +#define HAVE_DECL_V4L2_PRIORITY_UNSET 1 +#define HAVE_DECL_V4L2_TUNER_ANALOG_TV 1 +#define HAVE_DECL_V4L2_TUNER_DIGITAL_TV 1 +#define HAVE_DECL_V4L2_TUNER_RADIO 1 +#define HAVE_DECL_VM_BLOCK_DUMP 1 +#define HAVE_DECL_VM_HUGETLB_GROUP 1 +#define HAVE_DECL_VM_LAPTOP_MODE 1 +#define HAVE_DECL_VM_LEGACY_VA_LAYOUT 1 +#define HAVE_DECL_VM_MAX_MAP_COUNT 1 +#define HAVE_DECL_VM_SWAP_TOKEN_TIMEOUT 1 +#define HAVE_DECL_VM_VFS_CACHE_PRESSURE 1 +#define HAVE_DLADDR 1 +#define HAVE_ELF_H 1 +#define HAVE_FALLOCATE 1 +#define HAVE_FANOTIFY_MARK 1 +#define HAVE_FOPEN64 1 +#define HAVE_FPUTS_UNLOCKED 1 +/* #undef HAVE_GNU_STUBS */ +/* #undef HAVE_GNU_STUBS_32_H */ +/* #undef HAVE_GNU_STUBS_X32_H */ +/* #undef HAVE_LIBUNWIND_PTRACE_H */ +#define HAVE_LINUX_BPF_H 1 +#define HAVE_LINUX_BSG_H 1 +#define HAVE_LINUX_BTRFS_H 1 +#define HAVE_LINUX_DM_IOCTL_H 1 +#define HAVE_LINUX_DQBLK_XFS_H 1 +#define HAVE_LINUX_FALLOC_H 1 +#define HAVE_LINUX_FIEMAP_H 1 +#define HAVE_LINUX_FILTER_H 1 +#define HAVE_LINUX_HIDDEV_H 1 +#define HAVE_LINUX_INPUT_H 1 +#define HAVE_LINUX_IPC_H 1 +#define HAVE_LINUX_IP_VS_H 1 +#define HAVE_LINUX_MMTIMER_H 1 +#define HAVE_LINUX_MQUEUE_H 1 +#define HAVE_LINUX_MSG_H 1 +/* #undef HAVE_LINUX_NETFILTER_ARP_ARP_TABLES_H */ +/* #undef HAVE_LINUX_NETFILTER_BRIDGE_EBTABLES_H */ +/* #undef HAVE_LINUX_NETFILTER_IPV4_IP_TABLES_H */ +/* #undef HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H */ +#define HAVE_LINUX_PERF_EVENT_H 1 +#define HAVE_LINUX_QUOTA_H 1 +#define HAVE_LINUX_SECCOMP_H 1 +#define HAVE_LINUX_SECUREBITS_H 1 +#define HAVE_LINUX_SEM_H 1 +#define HAVE_LINUX_SHM_H 1 +#define HAVE_LINUX_USERFAULTFD_H 1 +#define HAVE_LINUX_UTSNAME_H 1 +/* #undef HAVE_M32_MPERS */ +/* #undef HAVE_M32_STRUCT_STAT */ +/* #undef HAVE_M32_STRUCT_STAT64 */ +/* #undef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC */ +/* #undef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC */ +#define HAVE_MEMORY_H 1 +/* #undef HAVE_MX32_MPERS */ +/* #undef HAVE_MX32_STRUCT_STAT */ +/* #undef HAVE_MX32_STRUCT_STAT64 */ +/* #undef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC */ +/* #undef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC */ +/* #undef HAVE_NETINET_SCTP_H */ +#define HAVE_NETINET_UDP_H 1 +/* #undef HAVE_NETIPX_IPX_H */ +#define HAVE_OPEN64 1 +#define HAVE_PRCTL 1 +#define HAVE_PREADV 1 +#define HAVE_PROCESS_VM_READV 1 +#define HAVE_PWRITEV 1 +#define HAVE_READAHEAD 1 +#define HAVE_SCSI_SG_H 1 +#define HAVE_SIGINFO_T_SI_OVERRUN 1 +#define HAVE_SIGINFO_T_SI_SYSCALL 1 +#define HAVE_SIGINFO_T_SI_TIMERID 1 +#define HAVE_SIGNALFD 1 +#define HAVE_STRUCT_BLK_USER_TRACE_SETUP 1 +/* #undef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START */ +#define HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS 1 +#define HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE 1 +#define HAVE_STRUCT_BTRFS_IOCTL_SEARCH_ARGS_V2_BUF_SIZE 1 +#define HAVE_STRUCT_FLOCK 1 +#define HAVE_STRUCT_FLOCK64 1 +/* #undef HAVE_STRUCT_IA64_FPREG */ +#define HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION 1 +#define HAVE_STRUCT_MMSGHDR 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_AUX_WATERMARK 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_BP_TYPE 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_BRANCH_SAMPLE_TYPE 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_COMM_EXEC 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_CONTEXT_SWITCH 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL 1 +/* #undef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_MAX_STACK */ +#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_INTR 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER 1 +#define HAVE_STRUCT_PERF_EVENT_ATTR_USE_CLOCKID 1 +/* #undef HAVE_STRUCT_PERF_EVENT_ATTR_WRITE_BACKWARD */ +#define HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS 1 +/* #undef HAVE_STRUCT_PT_ALL_USER_REGS */ +#define HAVE_STRUCT_SIGCONTEXT 1 +/* #undef HAVE_STRUCT_STAT64 */ +/* #undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC */ +#define HAVE_STRUCT_STATFS 1 +#define HAVE_STRUCT_STATFS64 1 +#define HAVE_STRUCT_STATFS64_F_FLAGS 1 +#define HAVE_STRUCT_STATFS64_F_FRSIZE 1 +#define HAVE_STRUCT_STATFS64_F_FSID_VAL 1 +/* #undef HAVE_STRUCT_STATFS64_F_FSID___VAL */ +#define HAVE_STRUCT_STATFS_F_FLAGS 1 +#define HAVE_STRUCT_STATFS_F_FRSIZE 1 +#define HAVE_STRUCT_STATFS_F_FSID_VAL 1 +/* #undef HAVE_STRUCT_STATFS_F_FSID___VAL */ +#define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +#define HAVE_STRUCT_TIMEX_TAI 1 +#define HAVE_STRUCT_USER_DESC 1 +#define HAVE_STRUCT_UTSNAME_DOMAINNAME 1 +/* #undef HAVE_STRUCT___KERNEL_FLOCK */ +/* #undef HAVE_STRUCT___KERNEL_FLOCK64 */ +#define HAVE_STRUCT___OLD_KERNEL_STAT 1 +#define HAVE_SYNC_FILE_RANGE 1 +/* #undef HAVE_SYS_CONF_H */ +#define HAVE_SYS_EVENTFD_H 1 +#define HAVE_SYS_FANOTIFY_H 1 +#define HAVE_SYS_QUOTA_H 1 +#define HAVE_SYS_REG_H 1 +#define HAVE_SYS_SIGNALFD_H 1 +#define HAVE_SYS_XATTR_H 1 +#define HAVE_TYPEOF 1 +/* #undef HAVE_UNION_BPF_ATTR_ATTACH_TYPE */ +#define HAVE_UNION_BPF_ATTR_BPF_FD 1 +#define HAVE_UNION_BPF_ATTR_LOG_BUF 1 +/* #undef HAVE_USTAT_H */ +#define HAVE___BUILTIN_POPCOUNT 1 +#define HAVE___KERNEL_LONG_T 1 +#define HAVE___KERNEL_ULONG_T 1 +/* #undef HPPA */ +/* #undef I386 */ +/* #undef IA64 */ +/* #undef LINUX_MIPSN32 */ +/* #undef LINUX_MIPSN64 */ +/* #undef LINUX_MIPSO32 */ +/* #undef M68K */ +/* #undef METAG */ +/* #undef MICROBLAZE */ +/* #undef MIPS */ +/* #undef NIOS2 */ +/* #undef OR1K */ +#define PACKAGE "strace" +#define PACKAGE_BUGREPORT "strace-devel@lists.sourceforge.net" +#define PACKAGE_NAME "strace" +#define PACKAGE_STRING "strace 4.16" +#define PACKAGE_TARNAME "strace" +#define PACKAGE_URL "https://strace.io" +#define PACKAGE_VERSION "4.16" +/* #undef POWERPC */ +/* #undef POWERPC64 */ +/* #undef RISCV */ +/* #undef S390 */ +/* #undef S390X */ +/* #undef SH */ +/* #undef SH64 */ +#define SIZEOF_KERNEL_LONG_T 8 +#define SIZEOF_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_OFF_T 8 +#define SIZEOF_STRUCT_I64_I32 16 +/* #undef SPARC */ +/* #undef SPARC64 */ +/* #undef TILE */ +/* #undef USE_LIBUNWIND */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +#define VERSION "4.16" +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif +/* #undef X32 */ +#define X86_64 1 +/* #undef XTENSA */ +/* #undef _MINIX */ +/* #undef _POSIX_1_SOURCE */ +/* #undef _POSIX_SOURCE */ +/* #undef gid_t */ +/* #undef typeof */ +/* #undef uid_t */ diff --git a/pkg/strace/gen.rc b/pkg/strace/gen.rc new file mode 100644 index 00000000..4c07740d --- /dev/null +++ b/pkg/strace/gen.rc @@ -0,0 +1,246 @@ +# it is important that the arch-specific directory is searched first +cflags\ + -D HAVE_CONFIG_H\ + -I include\ + -I '$dir' \ + -I '$srcdir'/linux/x86_64\ + -I '$srcdir'/linux\ + -I '$srcdir' \ + -I '$outdir' + +build '$outdir'/ioctl_iocdef.i cc '$srcdir'/ioctl_iocdef.c ; with\ + cflags '$cflags -P -E' +build '$outdir'/ioctl_iocdef.h sed '$outdir'/ioctl_iocdef.i ; with\ + expr '-n ''s/^DEFINE HOST/#define /p''' + +{ + toolchain host + cflags\ + -I '$srcdir'/linux/x86_64\ + -I '$srcdir'/linux\ + -I '$outdir' + + for(i in 0 1 2) { + build '$outdir'/ioctls_all$i.h cat '$srcdir'/linux/x86_64/^(ioctls_inc$i.h ioctls_arch$i.h) + build '$outdir'/ioctlsort$i.c.o cc '$srcdir'/ioctlsort.c '|' '$outdir'/^(ioctl_iocdef.h ioctls_all$i.h) ; with cflags\ + '$cflags -D IOCTLSORT_INC=''"ioctls_all'$i'.h"''' + exe ioctlsort$i ioctlsort$i.c.o + rule ioctlsort$i '$outdir/ioctlsort'$i' >$out.tmp && mv $out.tmp $out' + build '$outdir'/ioctlent$i.h ioctlsort$i '|' '$outdir'/ioctlsort$i + } +} >tools.ninja ; subninja tools.ninja + +mpers=`{grep -v '^#' mpers.txt} ; checkstatus +for(f in $mpers) { + build '$outdir'/$f.mpers.i cc '$srcdir'/$f ; with\ + cflags '$cflags -P -E -DIN_MPERS_BOOTSTRAP' +} + +fn mpers { + build '$outdir'/$1 awk '$outdir'/$mpers.mpers.i '|' '$dir'/$2 ; with\ + expr '-f $dir/'$2 +} + +mpers printers.h printers.awk +mpers native_printer_decls.h printerdecls.awk +mpers native_printer_defs.h printerdefs.awk + +build '$outdir'/syscallent.i cc '$srcdir'/linux/x86_64/syscallent.h ; with\ + cflags '$cflags -P -E' +build '$outdir'/scno-syscallent.h sed '$outdir'/syscallent.i ; with\ + expr '-n ''/TRACE_INDIRECT_SUBCALL/d; s/^\[[[:space:]]*\($$(digits)\)\][[:space:]]*=[[:space:]]*{[^,]*,[^,]*,[^,]*,[[:space:]]*"\($$(al_nums)\)"[[:space:]]*},.*/\#ifndef __NR_\2\n\# define __NR_\2 (SYSCALL_BIT |\1)\n\#endif/p''' +build '$outdir'/scno.h cat '$srcdir'/scno.head '$outdir'/scno-syscallent.h + +# this seems to be enough syscall headers to build +syscalls=linux/^(subcall.h (arm 32 64 i386 x86_64)^/syscallent.h) +build '$outdir'/sen.h awk '$srcdir'/$syscalls '|' '$dir'/sen.awk ; with\ + expr '-f $dir/sen.awk' + +libsrcs=(\ + fstatfs.c\ + fstatfs64.c\ + ipc.c\ + socketcall.c\ + statfs.c\ + statfs64.c\ + sync_file_range.c\ + sync_file_range2.c\ + upeek.c\ + upoke.c\ +) +srcs=(\ + access.c\ + affinity.c\ + aio.c\ + alpha.c\ + bjm.c\ + block.c\ + bpf.c\ + btrfs.c\ + cacheflush.c\ + capability.c\ + chdir.c\ + chmod.c\ + clone.c\ + copy_file_range.c\ + count.c\ + desc.c\ + dirent.c\ + dirent64.c\ + dm.c\ + epoll.c\ + evdev.c\ + eventfd.c\ + execve.c\ + fadvise.c\ + fallocate.c\ + fanotify.c\ + fchownat.c\ + fcntl.c\ + fetch_seccomp_fprog.c\ + fetch_struct_flock.c\ + fetch_struct_mmsghdr.c\ + fetch_struct_msghdr.c\ + fetch_struct_stat.c\ + fetch_struct_stat64.c\ + fetch_struct_statfs.c\ + file_handle.c\ + file_ioctl.c\ + fs_x_ioctl.c\ + flock.c\ + futex.c\ + get_robust_list.c\ + getcpu.c\ + getcwd.c\ + getrandom.c\ + hdio.c\ + hostname.c\ + inotify.c\ + io.c\ + ioctl.c\ + ioperm.c\ + iopl.c\ + ioprio.c\ + ipc_msg.c\ + ipc_msgctl.c\ + ipc_sem.c\ + ipc_shm.c\ + ipc_shmctl.c\ + kcmp.c\ + kexec.c\ + keyctl.c\ + ldt.c\ + link.c\ + lookup_dcookie.c\ + loop.c\ + lseek.c\ + mem.c\ + membarrier.c\ + memfd_create.c\ + mknod.c\ + mmsghdr.c\ + mount.c\ + mq.c\ + msghdr.c\ + mtd.c\ + net.c\ + netlink.c\ + numa.c\ + oldstat.c\ + open.c\ + or1k_atomic.c\ + pathtrace.c\ + perf.c\ + personality.c\ + pkeys.c\ + poll.c\ + prctl.c\ + print_dev_t.c\ + print_mq_attr.c\ + print_msgbuf.c\ + print_sg_req_info.c\ + print_sigevent.c\ + print_statfs.c\ + print_struct_stat.c\ + print_time.c\ + print_timespec.c\ + print_timeval.c\ + print_timex.c\ + printmode.c\ + printrusage.c\ + printsiginfo.c\ + process.c\ + process_vm.c\ + ptp.c\ + qualify.c\ + quota.c\ + readahead.c\ + readlink.c\ + reboot.c\ + renameat.c\ + resource.c\ + rtc.c\ + sched.c\ + scsi.c\ + seccomp.c\ + sendfile.c\ + sg_io_v3.c\ + sg_io_v4.c\ + sigaltstack.c\ + signal.c\ + signalfd.c\ + sigreturn.c\ + sock.c\ + sockaddr.c\ + socketutils.c\ + sram_alloc.c\ + stat.c\ + stat64.c\ + strace.c\ + swapon.c\ + syscall.c\ + sysctl.c\ + sysinfo.c\ + syslog.c\ + sysmips.c\ + term.c\ + time.c\ + times.c\ + truncate.c\ + ubi.c\ + uid.c\ + uid16.c\ + umask.c\ + umount.c\ + uname.c\ + userfaultfd.c\ + ustat.c\ + util.c\ + utime.c\ + utimes.c\ + v4l2.c\ + wait.c\ + xattr.c\ + xmalloc.c\ +) + +build '$outdir'/sys_func.h sed '$srcdir'/^($libsrcs $srcs) ; with\ + expr '-n ''s/^SYS_FUNC(.*/extern &;/p''' + +phony deps '$outdir'/^(\ + ioctlent^(0 1 2)^.h\ + native_printer_decls.h\ + native_printer_defs.h\ + printers.h\ + scno.h\ + sen.h\ + sys_func.h\ +) + +lib libstrace.a -d '$outdir'/printers.h $libsrcs +exe strace -d '$dir'/deps $srcs libstrace.a +file bin/strace '$outdir'/strace 755 +man 1 strace.1 + +fetch curl +gen_inputs='$dir'/mpers.txt diff --git a/pkg/strace/mpers.txt b/pkg/strace/mpers.txt new file mode 100644 index 00000000..a8d0c8af --- /dev/null +++ b/pkg/strace/mpers.txt @@ -0,0 +1,36 @@ +# 2,<awk '/^mpers_source_files =/ {for (i=3; i<=NF; ++i) print $i}' src/mpers.am +block.c +btrfs.c +dirent.c +evdev.c +fetch_seccomp_fprog.c +fetch_struct_flock.c +fetch_struct_mmsghdr.c +fetch_struct_msghdr.c +fetch_struct_stat.c +fetch_struct_stat64.c +fetch_struct_statfs.c +hdio.c +ipc_msgctl.c +ipc_shmctl.c +loop.c +mtd.c +print_mq_attr.c +print_msgbuf.c +print_sg_req_info.c +print_sigevent.c +print_time.c +print_timespec.c +print_timeval.c +print_timex.c +printrusage.c +printsiginfo.c +rtc.c +sg_io_v3.c +sigaltstack.c +sock.c +sysinfo.c +times.c +ustat.c +utime.c +v4l2.c diff --git a/pkg/strace/printerdecls.awk b/pkg/strace/printerdecls.awk new file mode 100644 index 00000000..5025bf96 --- /dev/null +++ b/pkg/strace/printerdecls.awk @@ -0,0 +1,11 @@ +BEGIN { + FS = "\\(|\\)|, " + OFS = ", " +} + +$1 == "MPERS_PRINTER_DECL" { + printf "extern %s %s(%s", $2, $3, $4 + for (i = 5; i < NF; ++i) + printf ", %s", $i + print ");" +} diff --git a/pkg/strace/printerdefs.awk b/pkg/strace/printerdefs.awk new file mode 100644 index 00000000..5f7e201a --- /dev/null +++ b/pkg/strace/printerdefs.awk @@ -0,0 +1,8 @@ +BEGIN { + FS = "\\(|\\)|, " + OFS = ", " +} + +$1 == "MPERS_PRINTER_DECL" { + print "." $3 " = " $3 "," +} diff --git a/pkg/strace/printers.awk b/pkg/strace/printers.awk new file mode 100644 index 00000000..cb3fa15a --- /dev/null +++ b/pkg/strace/printers.awk @@ -0,0 +1,19 @@ +BEGIN { + FS = "\\(|\\)|, " + OFS = ", " + print "typedef struct {" +} + +$1 == "MPERS_PRINTER_DECL" { + printf " %s (*%s)(%s", $2, $3, $4 + for (i = 5; i < NF; ++i) + printf ", %s", $i + print ");" + print "#define " $3 " MPERS_PRINTER_NAME(" $3 ")\n" +} + +END { + print "} struct_printers;" + print "extern const struct_printers *printers;" + print "#define MPERS_PRINTER_NAME(printer_name) printers->printer_name" +} diff --git a/pkg/strace/rev b/pkg/strace/rev new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/pkg/strace/rev @@ -0,0 +1 @@ +1 diff --git a/pkg/strace/sen.awk b/pkg/strace/sen.awk new file mode 100644 index 00000000..6a0e2364 --- /dev/null +++ b/pkg/strace/sen.awk @@ -0,0 +1,16 @@ +BEGIN { + print "enum {" + print "SEN_printargs = 0," +} + +match($0, /SEN\([^)]+\)/) { + name = substr($0, RSTART + 4, RLENGTH - 5) + if (name != "printargs") + print "SEN_" name "," | "sort -u" +} + +END { + if (close("sort -u")) + exit 1 + print "};" +} diff --git a/pkg/strace/sha256 b/pkg/strace/sha256 new file mode 100644 index 00000000..109ae8b2 --- /dev/null +++ b/pkg/strace/sha256 @@ -0,0 +1 @@ +98487cb5178ec1259986cc9f6e2a844f50e5d1208c112cc22431a1e4d9adf0ef strace-4.16.tar.xz diff --git a/pkg/strace/url b/pkg/strace/url new file mode 100644 index 00000000..5031d99a --- /dev/null +++ b/pkg/strace/url @@ -0,0 +1 @@ +url = "https://downloads.sourceforge.net/project/strace/strace/4.16/strace-4.16.tar.xz" @@ -40,6 +40,7 @@ devel=(\ qbe\ nasm\ scc\ + strace\ mc\ man-pages-posix\ ) |
